@Deprecated public abstract class AbstractReconfigurableSchedulingDaemonModule extends AbstractReconfigurableDaemonModule
AbstractReconfigurableDaemonModule
to allow
easy (un)registering of a scheduled job with some default optimization when dealing with JCR events.
Derived classes are responsible for creating/returning a valid job info and job trigger
by implementing getRepositoryJobInfo(Node)
and getRepositoryJobTrigger(Node, RepositoryJobInfo)
.
Also, they can return false in isSchedulerEnabled(Node)
when the scheduled job should be disabled.
Modifier and Type | Field and Description |
---|---|
protected static String |
CONFIG_LOCK_ISDEEP_PROPERTY
Deprecated.
|
protected static String |
CONFIG_LOCK_OWNER
Deprecated.
|
protected static String |
DEFAULT_GROUP
Deprecated.
|
moduleConfigPath, moduleName, session
Constructor and Description |
---|
AbstractReconfigurableSchedulingDaemonModule()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doConfigure(javax.jcr.Node moduleConfig)
Deprecated.
Lifecycle callback to allow a
DaemonModule to configure itself. |
protected void |
doInitialize(javax.jcr.Session session)
Deprecated.
Lifecycle callback that is called when this module is started.
|
protected void |
doShutdown()
Deprecated.
Lifecycle callback method that is called by the repository before shutting down .
|
protected abstract RepositoryJobInfo |
getRepositoryJobInfo(javax.jcr.Node moduleConfig)
Deprecated.
Returns the scheduled task job info.
|
protected abstract RepositoryJobTrigger |
getRepositoryJobTrigger(javax.jcr.Node moduleConfig,
RepositoryJobInfo jobInfo)
Deprecated.
Returns the scheduled task job trigger.
|
protected boolean |
isReconfigureEvent(javax.jcr.observation.Event event)
Deprecated.
Called by the module configuration listener on event.
|
protected boolean |
isSchedulerEnabled(javax.jcr.Node moduleConfig)
Deprecated.
Returns true only when the scheduling daemon is enabled.
|
protected void |
onConfigurationChange(javax.jcr.Node moduleConfig)
Deprecated.
Called when the module configuration has changed.
|
protected void |
scheduleJob(javax.jcr.Node moduleConfig)
Deprecated.
|
protected void |
unscheduleJob()
Deprecated.
|
configure, initialize, shutdown
protected static final String CONFIG_LOCK_ISDEEP_PROPERTY
protected static final String CONFIG_LOCK_OWNER
protected static final String DEFAULT_GROUP
public AbstractReconfigurableSchedulingDaemonModule()
protected void doConfigure(javax.jcr.Node moduleConfig) throws javax.jcr.RepositoryException
AbstractReconfigurableDaemonModule
DaemonModule
to configure itself.
This method is called on startup iff there is module config node,
and before AbstractReconfigurableDaemonModule.initialize(javax.jcr.Session)
is called. This method is also called when
the module config node or any of its descendants changes.doConfigure
in class AbstractReconfigurableDaemonModule
moduleConfig
- the node containing the configuration of this modulejavax.jcr.RepositoryException
protected void doInitialize(javax.jcr.Session session) throws javax.jcr.RepositoryException
AbstractReconfigurableDaemonModule
doInitialize
in class AbstractReconfigurableDaemonModule
session
- a Session
that can be used throughout this module's life.javax.jcr.RepositoryException
protected void doShutdown()
AbstractReconfigurableDaemonModule
doShutdown
in class AbstractReconfigurableDaemonModule
protected boolean isReconfigureEvent(javax.jcr.observation.Event event) throws javax.jcr.RepositoryException
AbstractReconfigurableDaemonModule
isReconfigureEvent
in class AbstractReconfigurableDaemonModule
event
- event returned by the EventIteratorjavax.jcr.RepositoryException
protected void onConfigurationChange(javax.jcr.Node moduleConfig) throws javax.jcr.RepositoryException
AbstractReconfigurableDaemonModule
AbstractReconfigurableDaemonModule.doConfigure(javax.jcr.Node)
but this method may be overridden.onConfigurationChange
in class AbstractReconfigurableDaemonModule
moduleConfig
- the new module configuration nodejavax.jcr.RepositoryException
protected void unscheduleJob()
protected void scheduleJob(javax.jcr.Node moduleConfig)
protected boolean isSchedulerEnabled(javax.jcr.Node moduleConfig) throws javax.jcr.RepositoryException
moduleConfig
- javax.jcr.RepositoryException
protected abstract RepositoryJobInfo getRepositoryJobInfo(javax.jcr.Node moduleConfig) throws javax.jcr.RepositoryException
moduleConfig
- javax.jcr.RepositoryException
protected abstract RepositoryJobTrigger getRepositoryJobTrigger(javax.jcr.Node moduleConfig, RepositoryJobInfo jobInfo) throws javax.jcr.RepositoryException
moduleConfig
- jobInfo
- javax.jcr.RepositoryException
Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.