railo.runtime.spooler
Class SpoolerEngineImpl

java.lang.Object
  extended by railo.runtime.spooler.SpoolerEngineImpl
All Implemented Interfaces:
SpoolerEngine

public class SpoolerEngineImpl
extends Object
implements SpoolerEngine


Constructor Summary
SpoolerEngineImpl(Config config, Resource persisDirectory, String label, Log log, int maxThreads)
           
 
Method Summary
 void add(SpoolerTask task)
          adds a task to the engine
 int adds()
           
 long calculateNextExecution(SpoolerTask task)
           
 PageException execute(SpoolerTask task)
          execute task and return error throwed by task
 PageException execute(String id)
          execute task by id and return eror throwd by task
 Query getAllTasksAsQuery(int startrow, int maxrow)
           
 int getClosedTaskCount()
           
 Query getClosedTasksAsQuery(int startrow, int maxrow)
           
 String getLabel()
          return the label of the engine
 int getMaxThreads()
           
 int getOpenTaskCount()
           
 Query getOpenTasksAsQuery(int startrow, int maxrow)
           
 void remove(SpoolerTask task)
          remove that task from Spooler
 void remove(String id)
          remove a task that match given id
 void removeAll()
           
 void setConfig(Config config)
           
 void setLabel(String label)
           
 void setLog(Log log)
           
 void setPersisDirectory(Resource persisDirectory)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpoolerEngineImpl

public SpoolerEngineImpl(Config config,
                         Resource persisDirectory,
                         String label,
                         Log log,
                         int maxThreads)
Method Detail

getMaxThreads

public int getMaxThreads()
Returns:
the maxThreads

add

public void add(SpoolerTask task)
Description copied from interface: SpoolerEngine
adds a task to the engine

Specified by:
add in interface SpoolerEngine

getLabel

public String getLabel()
Description copied from interface: SpoolerEngine
return the label of the engine

Specified by:
getLabel in interface SpoolerEngine
Returns:
the label

calculateNextExecution

public long calculateNextExecution(SpoolerTask task)

getOpenTasksAsQuery

public Query getOpenTasksAsQuery(int startrow,
                                 int maxrow)
                          throws PageException
Specified by:
getOpenTasksAsQuery in interface SpoolerEngine
Throws:
PageException

getClosedTasksAsQuery

public Query getClosedTasksAsQuery(int startrow,
                                   int maxrow)
                            throws PageException
Specified by:
getClosedTasksAsQuery in interface SpoolerEngine
Throws:
PageException

getAllTasksAsQuery

public Query getAllTasksAsQuery(int startrow,
                                int maxrow)
                         throws PageException
Specified by:
getAllTasksAsQuery in interface SpoolerEngine
Throws:
PageException

getOpenTaskCount

public int getOpenTaskCount()
Specified by:
getOpenTaskCount in interface SpoolerEngine

getClosedTaskCount

public int getClosedTaskCount()
Specified by:
getClosedTaskCount in interface SpoolerEngine

remove

public void remove(SpoolerTask task)
remove that task from Spooler

Specified by:
remove in interface SpoolerEngine
Parameters:
task -

removeAll

public void removeAll()

adds

public int adds()

remove

public void remove(String id)
Description copied from interface: SpoolerEngine
remove a task that match given id

Specified by:
remove in interface SpoolerEngine

execute

public PageException execute(String id)
execute task by id and return eror throwd by task

Specified by:
execute in interface SpoolerEngine
Parameters:
id -
Throws:
SpoolerException

execute

public PageException execute(SpoolerTask task)
Description copied from interface: SpoolerEngine
execute task and return error throwed by task

Specified by:
execute in interface SpoolerEngine

setLabel

public void setLabel(String label)

setPersisDirectory

public void setPersisDirectory(Resource persisDirectory)

setLog

public void setLog(Log log)

setConfig

public void setConfig(Config config)


Copyright © 2012 Railo