com.liferay.portal.scheduler
Class ClusterSchedulerEngine
java.lang.Object
com.liferay.portal.scheduler.ClusterSchedulerEngine
- All Implemented Interfaces:
- IdentifiableBean, SchedulerEngine, SchedulerEngineClusterManager
public class ClusterSchedulerEngine
- extends Object
- implements IdentifiableBean, SchedulerEngine, SchedulerEngineClusterManager
Fields inherited from interface com.liferay.portal.kernel.scheduler.SchedulerEngine |
AUDIT_ACTION, CONTEXT_PATH, DESCRIPTION, DESCRIPTION_MAX_LENGTH, DESTINATION_NAME, DISABLE, END_TIME, EXCEPTIONS_MAX_SIZE, FINAL_FIRE_TIME, GROUP_NAME, GROUP_NAME_MAX_LENGTH, JOB_NAME, JOB_NAME_MAX_LENGTH, JOB_STATE, LANGUAGE, MESSAGE, MESSAGE_LISTENER_CLASS_NAME, MESSAGE_LISTENER_UUID, NEXT_FIRE_TIME, PORTLET_ID, PREVIOUS_FIRE_TIME, RECEIVER_KEY, SCRIPT, START_TIME, STORAGE_TYPE |
Method Summary |
protected
|
callMaster(String masterAddressString,
MethodKey methodKey,
Object... arguments)
|
static SchedulerEngine |
createClusterSchedulerEngine(SchedulerEngine schedulerEngine)
|
void |
delete(String groupName)
|
void |
delete(String jobName,
String groupName)
|
String |
getBeanIdentifier()
|
protected Object |
getDeserializedObject(String string)
|
protected String |
getFullName(String jobName,
String groupName)
|
protected String |
getMasterAddressString(boolean asynchronous)
|
SchedulerResponse |
getScheduledJob(String jobName,
String groupName)
|
List<SchedulerResponse> |
getScheduledJobs()
|
List<SchedulerResponse> |
getScheduledJobs(String groupName)
|
protected String |
getSerializedString(Object object)
|
void |
initialize()
|
protected void |
initMemoryClusteredJobs(List<SchedulerResponse> schedulerResponses)
|
protected boolean |
isMemoryClusteredSlaveJob(String groupName)
|
protected void |
masterToSlave(String masterAddressString,
boolean asynchronous)
|
void |
pause(String groupName)
|
void |
pause(String jobName,
String groupName)
|
protected void |
removeMemoryClusteredJobs(String groupName)
|
protected ObjectValuePair<String,StorageType> |
resolveGroupName(String groupName)
|
void |
resume(String groupName)
|
void |
resume(String jobName,
String groupName)
|
void |
schedule(Trigger trigger,
String description,
String destinationName,
Message message)
|
void |
setBeanIdentifier(String beanIdentifier)
|
protected void |
setClusterableThreadLocal(String groupName)
|
void |
shutdown()
|
protected void |
slaveToMaster()
|
void |
start()
|
void |
suppressError(String jobName,
String groupName)
|
void |
unschedule(String groupName)
|
void |
unschedule(String jobName,
String groupName)
|
void |
update(Trigger trigger)
|
protected void |
updateMemoryClusteredJob(String jobName,
String groupName,
TriggerState triggerState)
|
protected void |
updateMemoryClusteredJobs(String groupName,
TriggerState triggerState)
|
Lock |
updateMemorySchedulerClusterMaster()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
schedulerEngine
@BeanReference(name="com.liferay.portal.scheduler.ClusterSchedulerEngineService")
protected SchedulerEngine schedulerEngine
ClusterSchedulerEngine
public ClusterSchedulerEngine(SchedulerEngine schedulerEngine)
createClusterSchedulerEngine
public static SchedulerEngine createClusterSchedulerEngine(SchedulerEngine schedulerEngine)
delete
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void delete(String groupName)
throws SchedulerException
- Specified by:
delete
in interface SchedulerEngine
- Throws:
SchedulerException
delete
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void delete(String jobName,
String groupName)
throws SchedulerException
- Specified by:
delete
in interface SchedulerEngine
- Throws:
SchedulerException
getBeanIdentifier
public String getBeanIdentifier()
- Specified by:
getBeanIdentifier
in interface IdentifiableBean
getScheduledJob
public SchedulerResponse getScheduledJob(String jobName,
String groupName)
throws SchedulerException
- Specified by:
getScheduledJob
in interface SchedulerEngine
- Throws:
SchedulerException
getScheduledJobs
public List<SchedulerResponse> getScheduledJobs()
throws SchedulerException
- Specified by:
getScheduledJobs
in interface SchedulerEngine
- Throws:
SchedulerException
getScheduledJobs
public List<SchedulerResponse> getScheduledJobs(String groupName)
throws SchedulerException
- Specified by:
getScheduledJobs
in interface SchedulerEngine
- Throws:
SchedulerException
initialize
public void initialize()
throws SchedulerException
- Specified by:
initialize
in interface SchedulerEngineClusterManager
- Throws:
SchedulerException
pause
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void pause(String groupName)
throws SchedulerException
- Specified by:
pause
in interface SchedulerEngine
- Throws:
SchedulerException
pause
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void pause(String jobName,
String groupName)
throws SchedulerException
- Specified by:
pause
in interface SchedulerEngine
- Throws:
SchedulerException
resume
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void resume(String groupName)
throws SchedulerException
- Specified by:
resume
in interface SchedulerEngine
- Throws:
SchedulerException
resume
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void resume(String jobName,
String groupName)
throws SchedulerException
- Specified by:
resume
in interface SchedulerEngine
- Throws:
SchedulerException
schedule
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void schedule(Trigger trigger,
String description,
String destinationName,
Message message)
throws SchedulerException
- Specified by:
schedule
in interface SchedulerEngine
- Throws:
SchedulerException
setBeanIdentifier
public void setBeanIdentifier(String beanIdentifier)
- Specified by:
setBeanIdentifier
in interface IdentifiableBean
shutdown
public void shutdown()
throws SchedulerException
- Specified by:
shutdown
in interface SchedulerEngine
- Throws:
SchedulerException
start
public void start()
throws SchedulerException
- Specified by:
start
in interface SchedulerEngine
- Throws:
SchedulerException
suppressError
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void suppressError(String jobName,
String groupName)
throws SchedulerException
- Specified by:
suppressError
in interface SchedulerEngine
- Throws:
SchedulerException
unschedule
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void unschedule(String groupName)
throws SchedulerException
- Specified by:
unschedule
in interface SchedulerEngine
- Throws:
SchedulerException
unschedule
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void unschedule(String jobName,
String groupName)
throws SchedulerException
- Specified by:
unschedule
in interface SchedulerEngine
- Throws:
SchedulerException
update
@Clusterable(acceptor=com.liferay.portal.scheduler.ClusterSchedulerEngine.SchedulerClusterInvokeAcceptor.class)
public void update(Trigger trigger)
throws SchedulerException
- Specified by:
update
in interface SchedulerEngine
- Throws:
SchedulerException
updateMemorySchedulerClusterMaster
public Lock updateMemorySchedulerClusterMaster()
throws SchedulerException
- Specified by:
updateMemorySchedulerClusterMaster
in interface SchedulerEngineClusterManager
- Throws:
SchedulerException
callMaster
protected <T> T callMaster(String masterAddressString,
MethodKey methodKey,
Object... arguments)
throws SchedulerException
- Throws:
SchedulerException
getDeserializedObject
protected Object getDeserializedObject(String string)
throws SchedulerException
- Throws:
SchedulerException
getFullName
protected String getFullName(String jobName,
String groupName)
getMasterAddressString
protected String getMasterAddressString(boolean asynchronous)
throws SchedulerException
- Throws:
SchedulerException
getSerializedString
protected String getSerializedString(Object object)
throws Exception
- Throws:
Exception
initMemoryClusteredJobs
protected void initMemoryClusteredJobs(List<SchedulerResponse> schedulerResponses)
throws Exception
- Throws:
Exception
isMemoryClusteredSlaveJob
protected boolean isMemoryClusteredSlaveJob(String groupName)
throws SchedulerException
- Throws:
SchedulerException
masterToSlave
protected void masterToSlave(String masterAddressString,
boolean asynchronous)
throws SchedulerException
- Throws:
SchedulerException
removeMemoryClusteredJobs
protected void removeMemoryClusteredJobs(String groupName)
resolveGroupName
protected ObjectValuePair<String,StorageType> resolveGroupName(String groupName)
setClusterableThreadLocal
protected void setClusterableThreadLocal(String groupName)
slaveToMaster
protected void slaveToMaster()
throws SchedulerException
- Throws:
SchedulerException
updateMemoryClusteredJob
protected void updateMemoryClusteredJob(String jobName,
String groupName,
TriggerState triggerState)
updateMemoryClusteredJobs
protected void updateMemoryClusteredJobs(String groupName,
TriggerState triggerState)