public class SpoolerEngineImpl extends Object implements SpoolerEngine
Constructor and Description |
---|
SpoolerEngineImpl(Config config,
Resource persisDirectory,
String label,
Log log,
int maxThreads) |
Modifier and Type | Method and Description |
---|---|
void |
add(SpoolerTask task)
adds a task to the engine
|
void |
add(Task task) |
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 |
setMaxThreads(int maxThreads) |
void |
setPersisDirectory(Resource persisDirectory) |
public SpoolerEngineImpl(Config config, Resource persisDirectory, String label, Log log, int maxThreads)
public void setMaxThreads(int maxThreads)
public int getMaxThreads()
public void add(SpoolerTask task)
SpoolerEngine
add
in interface SpoolerEngine
public String getLabel()
SpoolerEngine
getLabel
in interface SpoolerEngine
public long calculateNextExecution(SpoolerTask task)
public Query getOpenTasksAsQuery(int startrow, int maxrow) throws PageException
getOpenTasksAsQuery
in interface SpoolerEngine
PageException
public Query getClosedTasksAsQuery(int startrow, int maxrow) throws PageException
getClosedTasksAsQuery
in interface SpoolerEngine
PageException
public Query getAllTasksAsQuery(int startrow, int maxrow) throws PageException
getAllTasksAsQuery
in interface SpoolerEngine
PageException
public int getOpenTaskCount()
getOpenTaskCount
in interface SpoolerEngine
public int getClosedTaskCount()
getClosedTaskCount
in interface SpoolerEngine
public void remove(SpoolerTask task)
remove
in interface SpoolerEngine
task
- public void removeAll()
public int adds()
public void remove(String id)
SpoolerEngine
remove
in interface SpoolerEngine
public PageException execute(String id)
execute
in interface SpoolerEngine
id
- public PageException execute(SpoolerTask task)
SpoolerEngine
execute
in interface SpoolerEngine
public void setPersisDirectory(Resource persisDirectory)
Copyright © 2015 Lucee