public class ShutdownHookPlugin extends Object implements SchedulerPlugin
Scheduler.shutdown(boolean)
Constructor and Description |
---|
ShutdownHookPlugin() |
Modifier and Type | Method and Description |
---|---|
protected org.slf4j.Logger |
getLog() |
void |
initialize(String name,
Scheduler scheduler,
ClassLoadHelper classLoadHelper)
Called during creation of the
Scheduler in order to give
the SchedulerPlugin a chance to initialize. |
boolean |
isCleanShutdown()
Determine whether or not the plug-in is configured to cause a clean
shutdown of the scheduler.
|
void |
setCleanShutdown(boolean b)
Set whether or not the plug-in is configured to cause a clean shutdown
of the scheduler.
|
void |
shutdown()
Called in order to inform the
SchedulerPlugin that it
should free up all of it's resources because the scheduler is shutting
down. |
void |
start()
Called when the associated
Scheduler is started, in order
to let the plug-in know it can now make calls into the scheduler if it
needs to. |
public boolean isCleanShutdown()
The default value is true
.
Scheduler.shutdown(boolean)
public void setCleanShutdown(boolean b)
The default value is true
.
Scheduler.shutdown(boolean)
protected org.slf4j.Logger getLog()
public void initialize(String name, Scheduler scheduler, ClassLoadHelper classLoadHelper) throws SchedulerException
Called during creation of the Scheduler
in order to give
the SchedulerPlugin
a chance to initialize.
initialize
in interface SchedulerPlugin
name
- The name by which the plugin is identified.scheduler
- The scheduler to which the plugin is registered.classLoadHelper
- The classLoadHelper the SchedulerFactory
is
actually usingSchedulerConfigException
- if there is an error initializing.SchedulerConfigException
- if there is an error initializing.SchedulerException
public void start()
SchedulerPlugin
Called when the associated Scheduler
is started, in order
to let the plug-in know it can now make calls into the scheduler if it
needs to.
start
in interface SchedulerPlugin
public void shutdown()
Called in order to inform the SchedulerPlugin
that it
should free up all of it's resources because the scheduler is shutting
down.
shutdown
in interface SchedulerPlugin
Copyright 2001-2019, Terracotta, Inc.