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()
           
 SpoolerTask[] getClosedTasks()
          return all closed task that are inside the Engine
 Query getClosedTasksAsQuery(int startrow, int maxrow)
           
 String getLabel()
          return the label of the engine
 int getMaxThreads()
           
 int getOpenTaskCount()
           
 SpoolerTask[] getOpenTasks()
          return all open task that are inside the Engine
 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)
                  throws IOException
Throws:
IOException
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
See Also:
SpoolerEngine.add(railo.runtime.spooler.SpoolerTask)

getLabel

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

Specified by:
getLabel in interface SpoolerEngine
Returns:
the label
See Also:
SpoolerEngine.getLabel()

calculateNextExecution

public long calculateNextExecution(SpoolerTask task)
See Also:
railo.runtime.spooler.SpoolerEngine#calculateNextExecution(railo.runtime.spooler.SpoolerTask)

getOpenTasks

public SpoolerTask[] getOpenTasks()
Description copied from interface: SpoolerEngine
return all open task that are inside the Engine

Specified by:
getOpenTasks in interface SpoolerEngine
Returns:
all open tasks
See Also:
SpoolerEngine.getOpenTasks()

getClosedTasks

public SpoolerTask[] getClosedTasks()
Description copied from interface: SpoolerEngine
return all closed task that are inside the Engine

Specified by:
getClosedTasks in interface SpoolerEngine
Returns:
all closed tasks
See Also:
SpoolerEngine.getClosedTasks()

getOpenTasksAsQuery

public Query getOpenTasksAsQuery(int startrow,
                                 int maxrow)
                          throws PageException
Throws:
PageException

getClosedTasksAsQuery

public Query getClosedTasksAsQuery(int startrow,
                                   int maxrow)
                            throws PageException
Throws:
PageException

getAllTasksAsQuery

public Query getAllTasksAsQuery(int startrow,
                                int maxrow)
                         throws PageException
Throws:
PageException

getOpenTaskCount

public int getOpenTaskCount()

getClosedTaskCount

public int getClosedTaskCount()

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
See Also:
SpoolerEngine.remove(java.lang.String)

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)
See Also:
railo.runtime.spooler.SpoolerEngine#setLabel(java.lang.String)

setPersisDirectory

public void setPersisDirectory(Resource persisDirectory)
See Also:
railo.runtime.spooler.SpoolerEngine#setPersisDirectory(railo.commons.io.res.Resource)

setLog

public void setLog(Log log)
See Also:
railo.runtime.spooler.SpoolerEngine#setLog(railo.commons.io.log.Log)

setConfig

public void setConfig(Config config)
See Also:
railo.runtime.spooler.SpoolerEngine#setConfig(railo.runtime.config.Config)


Copyright © 2012 Railo