All Implemented Interfaces:
public final class
ScheduledTask which registers itself with the ModuleController. Whenever the TaskScheduler executes this task it finds all books which have
registered with it via registerCleanup() and calls their cleanUp() methods. This is intended for implementing daily book cleanup tasks like
eliminating level 2 rows from the previous day etc. Some books may have other mechanisms available for this, for example MySQL based books can
be managed using a separate process which talks directly to the database server.
Modifier and Type
Method and Description
( deRegisterCleanup Book book)
Get the version number string for this interface.
( init ModuleController mc,
Initialize the interface.
init ModuleController mc,
Initialize the task.
( registerCleanup Book book)
Restarts the interface.
Start the interface.
Stop the interface.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tradedesksoftware.feedhandler.container.
public void init(NestedCategory taskcat,
Initialize the task. This just provides some general information which is used
by the job scheduler and may be used by implementation classes.
mc - ModuleController which controls the JobScheduler module, this
could be useful for instance to acquire access to other
loaded modules, or signal for module shutdown.
starttime - String containing value of the 'time' property passed to the
schedule - String containing the value of the 'schedule' property passed to
the job scheduler.
name - String the category name for this task's schedule in the
configuration. Can be used to output more informative log messages.
public void start()
Start the interface. This allows the service framework to tell the interface that it is ok
to begin doing any processing it wants to do (ie start up some threads, etc).
- Thrown when startup fails
public void stop()
Stop the interface. This allows the service framework to tell the interface that it is time to stop
doing whatever it is doing (ie stop all its threads, drop network connections, etc).
- Thrown when shutdown fails
public void restart()
Restarts the interface. This allows the service framework to tell the interface to go back to the state
it should be at right after a call to start(). This is called when some module has called back to the
module controller indicating a problem/failure which should be recovered by a restart.
- Thrown when it is impossible to shutdown or restart
public void init(
Initialize the interface. This provides the interface with configuration information and a hook to the
module controller implementation which it can use to call back and request restart or shutdown.
init IFeedModule Parameters:
mc - ModuleController instance which controls this module, normally the service object itself
category - NestedCategory providing the configuration properties for this module
- Thrown when the configuration is incorrect or cannot be processed