Package de.hybris.platform.cronjob.jalo
Class CronJobManager
java.lang.Object
de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.extension.Extension
de.hybris.platform.cronjob.jalo.GeneratedCronJobManager
de.hybris.platform.cronjob.jalo.CronJobManager
- All Implemented Interfaces:
ItemLifecycleListener,Serializable
The CronJobManager offers create-methods for CronJobExtension items and methods for
Trigger handling.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classstatic classNested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension
Extension.RestrictedLanguagesProvider, Extension.RightsProviderNested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final CronJobLogListenerstatic final de.hybris.platform.cronjob.jalo.CronJobManager.CronJobTenantListenerstatic final StringFields inherited from class de.hybris.platform.cronjob.jalo.GeneratedCronJobManager
DEFAULT_INITIAL_ATTRIBUTES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabortRunningCronJobsForClusterNode(int nodeID) Deprecated.voidabortRunningCronJobsForClusterNodes(Set<Integer> nodeIds, int maxCronJobsCount) Deprecated, for removal: This API element is subject to removal in a future version.since 2011 - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob.voidabortRunningCronJobsForClusterNodes(Set<Integer> staleNodeIds, Set<Integer> allNodeIds, int maxCronJobsCount) Deprecated.internal - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob.voidafterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes) Overwritten to trigger re-poll whenever a new task item has been created.protected voidcheckBeforeItemRemoval(SessionContext ctx, Item item) Superclass method overridden to avoid calls to ejb layer.createBatchJob(SessionContext ctx, Map params) Deprecated.since agesBatchJobis obsolete since 4.3createBatchJob(String code) Deprecated.since 4.3BatchJobis obsoletecreateBatchJob(Map params) Deprecated.since agesBatchJobis obsolete since 4.3createChangeDescriptor(SessionContext ctx, Map params) Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationcreateChangeDescriptor(Map params) Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationcreateCronJob(Job job, String code, boolean active) Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationcreateCronJob(Job job, String code, boolean active, int node) Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationcreateCronJob(SessionContext ctx, Map params) Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationcreateCronJob(Map params) Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationcreateCSVExportStep(SessionContext ctx, Map params) Deprecated.since 4.3Stepis obsoletecreateCSVExportStep(Map params) Deprecated.since 4.3Stepis obsoletevoidcreateEssentialData(Map params, JspContext jspc) createFlexibleSearchCronJob(SessionContext ctx, Map params) Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3createFlexibleSearchCronJob(Map params) Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3createGetURLStep(SessionContext ctx, Map params) Deprecated.since 4.3Stepis obsoletecreateGetURLStep(Map params) Deprecated.since 4.3Stepis obsoletecreateJobLog(SessionContext ctx, Map params) Deprecated.since ages - there should be used aJobLogModeldirectly insteadcreateJobLog(Map params) Deprecated.since ages - there should be used aJobLogModeldirectly insteadcreateJobMedia(SessionContext ctx, Map params) Deprecated.since ages - there should be used aJobMediaModeldirectly insteadcreateJobMedia(Map params) Deprecated.since ages - there should be used aJobMediaModeldirectly insteadcreateMediaProcessCronJob(SessionContext ctx, Map params) Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadcreateMediaProcessCronJob(Map params) Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadprotected StrandedItemsRegistrycreateTrigger(CronJob cronJob, int second, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, int second, int minute, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, int second, int minute, int hour, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year, List daysOfWeek, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, int second, int minute, int hour, List daysOfWeek, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(CronJob cronJob, Date date) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(SessionContext ctx, Map params) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTrigger(Map params) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationcreateTypeSystemExportJob(SessionContext ctx, Map params) Deprecated.since agesTypeSystemExportJobis obsolete since 4.3Deprecated.since agesTypeSystemExportJobis obsolete since 4.3createTypeSystemExportJob(Map params) Deprecated.since agesTypeSystemExportJobis obsolete since 4.3createURLCronJob(SessionContext ctx, Map params) Deprecated.since agesURLCronJobis obsolete since 4.3createURLCronJob(Map params) Deprecated.since agesURLCronJobis obsolete since 4.3protected voidvoidprotected TriggerTaskfindTaskForTrigger(Trigger trigger) Searches for Task for the given Trigger.Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers()getActiveTriggers(Date date) Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers(Calendar)protected StringDeprecated.since ages - use plainMediaFolderModelcreation instead, refer to wiki documentationgetCronJobsToBeAborted(Set<Integer> nodeID, int maxCount) Deprecated, for removal: This API element is subject to removal in a future version.since 2011 - usegetCronJobsToBeAborted(Set, Set, int)insteadgetCronJobsToBeAborted(Set<Integer> staleNodeIds, Set<Integer> allNodeIds, int maxCount) Method gets the running cronjobs that are marked as running on givenstaleNodeIdsor is not inallNodeIdsset.Deprecated.since ages - useRendererService.getRendererTemplateForCode(String)insteadstatic CronJobManagerReturns the CronJobManager instance.static CronJobManagergetInstance(Tenant tenant) Deprecated.since ages - use plainJobModelcreation instead, refer to wiki documentationgetLocalCronJobsToBeAborted(Set<PK> cronJobsToCheck) Deprecated.Deprecated.since ages - please usegetNextCronjobNumber()instead!Deprecated.since ages - useCronJobService.getJob(String)instead with spring bean ofMoveMediaJobPerformableas parameter value.getRunningOrRestartedCronJobsForNode(int nodeID) Deprecated.since ages - useCronJobService.getRunningOrRestartedCronJobs()instead.protected TaskEnginebooleanPart ofDataCreatorinterface.voidnotifyInitializationEnd(Map params, JspContext ctx) voidnotifyInitializationStart(Map<String, String> params, JspContext ctx) protected voidnotifyItemRemoval(SessionContext ctx, Item item) Superclass method overridden to avoid calls to ejb layer.voidIs called on first session creation (while startup) exactly one time.voidperformOnOtherNode(int nodeID, CronJob cronJob) Deprecated.since ages - useCronJobService.performCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead.protected AfterCronJobCrashAbortEventprotected voidprotected voidvoidsetKeyGenerator(KeyGenerator keyGenerator) protected voidStarts the actual task engine.static voidDeprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngineprotected voidprotected voidprotected voidStops the task engine.static voidDeprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngineupdateCronJobsStatusToAborted(List<org.apache.commons.lang3.tuple.Pair<PK, Integer>> result) protected booleanupdateCronJobStatusToAborted(PK pk, Integer runningOnClusterNodeId, PK cronJobStatusAbortedPK, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) Methods inherited from class de.hybris.platform.cronjob.jalo.GeneratedCronJobManager
createAfterRetentionCleanupRule, createAfterRetentionCleanupRule, createBatch, createBatch, createBusinessProcess, createBusinessProcess, createBusinessProcessParameter, createBusinessProcessParameter, createCleanUpCronJob, createCleanUpCronJob, createCleanupDynamicProcessDefinitionsCronJob, createCleanupDynamicProcessDefinitionsCronJob, createCompositeCronJob, createCompositeCronJob, createCompositeEntry, createCompositeEntry, createCompositeJob, createCompositeJob, createCronJobHistory, createCronJobHistory, createDistributedProcess, createDistributedProcess, createDistributedProcessTransitionTask, createDistributedProcessTransitionTask, createDistributedProcessWorkerTask, createDistributedProcessWorkerTask, createDynamicMaintenanceCleanupJob, createDynamicMaintenanceCleanupJob, createDynamicProcessDefinition, createDynamicProcessDefinition, createFlexibleSearchRetentionRule, createFlexibleSearchRetentionRule, createJobSearchRestriction, createJobSearchRestriction, createLogFile, createLogFile, createMaintenanceCleanupJob, createMaintenanceCleanupJob, createMediaFolderStructureMigrationCronJob, createMediaFolderStructureMigrationCronJob, createMoveMediaCronJob, createMoveMediaCronJob, createMoveMediaJob, createMoveMediaJob, createProcessTask, createProcessTask, createProcessTaskLog, createProcessTaskLog, createProcessTaskLogMaintenanceJob, createProcessTaskLogMaintenanceJob, createRemoveItemsCronJob, createRemoveItemsCronJob, createRemoveItemsJob, createRemoveItemsJob, createRetentionJob, createRetentionJob, createScriptingJob, createScriptingJob, createScriptingTask, createScriptingTask, createServicelayerJob, createServicelayerJob, createSimpleAction, createSimpleAction, createSimpleBatch, createSimpleBatch, createSimpleDistributedProcess, createSimpleDistributedProcess, createTask, createTask, createTaskCondition, createTaskCondition, createTriggerTask, createTriggerTask, getDefaultAttributeModes, getNameMethods inherited from class de.hybris.platform.jalo.extension.Extension
checkBeforeInitialization, createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, writeReplaceMethods inherited from class de.hybris.platform.jalo.Manager
beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrap
-
Field Details
-
LOADONSTARTUP_CONFIG_PARAM
- See Also:
-
CRON_JOB_HISTORY_RESET_THRESHOLD_HOURS
- See Also:
-
BEAN_NAME
- See Also:
-
listener
public static final de.hybris.platform.cronjob.jalo.CronJobManager.CronJobTenantListener listener -
cronjobLogger
-
-
Constructor Details
-
CronJobManager
public CronJobManager()
-
-
Method Details
-
setKeyGenerator
-
processStartMessage
-
doStart
-
performOnOtherNode
@Deprecated(since="ages", forRemoval=false) public void performOnOtherNode(int nodeID, CronJob cronJob) Deprecated.since ages - useCronJobService.performCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead.Tries to performs a given cronjob on a different node.- Parameters:
nodeID- the node to perform this cronjob atcronJob- the cronjob to perform
-
onFirstSessionCreation
public void onFirstSessionCreation()Description copied from class:ExtensionIs called on first session creation (while startup) exactly one time. Put here code which has to be called within startup process.- Overrides:
onFirstSessionCreationin classExtension
-
startupCronjobEngine
protected void startupCronjobEngine() -
stopConjobEngine
protected void stopConjobEngine() -
getCronjobBroadcastMessagePrefix
-
getInstance
Returns the CronJobManager instance.- Returns:
- the CronJobManager instance
-
getInstance
-
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException Superclass method overridden to avoid calls to ejb layer.- Overrides:
checkBeforeItemRemovalin classExtension- Parameters:
ctx- the current session contextitem- the item which should be removed- Throws:
ConsistencyCheckException- thrown to abort removal due to consistency errors
-
notifyItemRemoval
Superclass method overridden to avoid calls to ejb layer.- Overrides:
notifyItemRemovalin classExtension- Parameters:
ctx- the currency session contextitem- the item which is going to be removed
-
createBatchJob
Deprecated.since 4.3BatchJobis obsoleteCreates aBatchJobwith the specified code.- Parameters:
code- the code of the newBatchJob- Returns:
- the new
BatchJob
-
createCronJob
@Deprecated(since="ages", forRemoval=false) public CronJob createCronJob(Job job, String code, boolean active) Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a CronJob for the specifiedJob, with the specified code and active flag. The node id of the newCronJobis set to the value configured in the project|local.properties file in the extension directory with the 'cronjob.clusterid' property.- Parameters:
job- theJobwhich should be performed using this newCronJobcode- the code of the newCronJobactive-true, if the newCronJobshould be active.false, if theCronJobshould be inactive- Returns:
- the new
CronJob
-
createCronJob
@Deprecated(since="ages", forRemoval=false) public CronJob createCronJob(Job job, String code, boolean active, int node) Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a CronJob for the specifiedJob, with the specified code and active flag. The node id of the newCronJobis set to the value configured in the project|local.properties file in the extension directory with the 'cronjob.mastermode' property.- Parameters:
job- theJobwhich should be performed using this newCronJobcode- the code of the newCronJobactive-true, if the newCronJobshould be active.false, if theCronJobshould be inactivenode- the id of the node, thisCronJobshould be executed on- Returns:
- the new
CronJob
-
createTypeSystemExportJob
@Deprecated(since="ages", forRemoval=false) public TypeSystemExportJob createTypeSystemExportJob(String code) Deprecated.since agesTypeSystemExportJobis obsolete since 4.3Creates a newTypeSystemExportJobinstance with the specified code.- Parameters:
code- the code of the newTypeSystemExportJob- Returns:
- a new
TypeSystemExportJobinstance with the specified code
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, Date date) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates a trigger for a single date only.- Parameters:
cronJob- the cronjob to performdate- the date to perform cronjob at
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)month- the month at which theTriggershould fire (0-11 or -1 for every month)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)month- the month at which theTriggershould fire (0-11 or -1 for every month)year- the year when theTriggershould fire (-1 for every year)- Returns:
- the Trigger created
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, List daysOfWeek, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)daysOfWeek- aListof EnumerationValues ((@link CronJobConstants.TC.DayOfWeek}, Value constants ((@link CronJobConstants.Enumerations.DayOfWeek)})relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year, List daysOfWeek, boolean relative) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)month- the month at which theTriggershould fire (0-11 or -1 for every month)year- the year when theTriggershould fire (-1 for every year)daysOfWeek- aListofrelative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
getJob
Deprecated.since ages - use plainJobModelcreation instead, refer to wiki documentationReturns theJobwith the specified code.- Parameters:
code- the code of the searchedJob- Returns:
- the Job
-
getRunningOrRestartedCronJobsForNode
@Deprecated(since="ages", forRemoval=false) public Collection<CronJob> getRunningOrRestartedCronJobsForNode(int nodeID) Deprecated.since ages - useCronJobService.getRunningOrRestartedCronJobs()instead.Returns aCollectionof all running or restarted CronJobs for the specified nodeID.- Parameters:
nodeID- the ID of the node, for which all restarted or running Cronjobs should be returned- Returns:
- a
Collectionof all running or restarted CronJobs for the specified nodeID
-
abortRunningCronJobsForClusterNode
@Deprecated(since="ages", forRemoval=false) public boolean abortRunningCronJobsForClusterNode(int nodeID) Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob. Note that since 4.3 aborting the cronJob on the distant node is not possible.Sets all running or restarted CronJobs for the specified nodeID to status ABORT (usingCronJob.setAborted()). This is an internal method that should run only after system restart before the timerthread is started to catch all cronjobs that were hit by a hard shutdown (e.g. CTRL-C on Windows).- Parameters:
nodeID- the ID of the node, whose running / restarted CronJobs should be aborted- Returns:
trueif all CronJobs were aborted successfully,falseotherwise
-
abortRunningCronJobsForClusterNodes
@Deprecated(since="2011", forRemoval=true) public void abortRunningCronJobsForClusterNodes(Set<Integer> nodeIds, int maxCronJobsCount) Deprecated, for removal: This API element is subject to removal in a future version.since 2011 - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob. -
abortRunningCronJobsForClusterNodes
@Deprecated(since="internal") public void abortRunningCronJobsForClusterNodes(Set<Integer> staleNodeIds, Set<Integer> allNodeIds, int maxCronJobsCount) Deprecated.internal - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob.Sets all running or restarted CronJobs for the specified nodeIDs to status ABORT. This is an internal method that should run only by a unlocking mechanism to catch all cronjobs that were hit by a hard shutdown (e.g. CTRL-C on Windows) on environment with clustering and autodiscovery enabled (random nodeIds).- Parameters:
staleNodeIds- the IDs of the nodes, whose running / restarted CronJobs should be aborted
-
findAndFixAllCronJobHistoryEntries
public void findAndFixAllCronJobHistoryEntries() -
findAllCronJobHistoryEntries
-
getLocalCronJobsToBeAborted
@Deprecated(since="internal") protected List<org.apache.commons.lang3.tuple.Pair<PK,Integer>> getLocalCronJobsToBeAborted(Set<PK> cronJobsToCheck) Deprecated. -
getCronJobsToBeAborted
@Deprecated(since="2011", forRemoval=true) protected List<org.apache.commons.lang3.tuple.Pair<PK,Integer>> getCronJobsToBeAborted(Set<Integer> nodeID, int maxCount) Deprecated, for removal: This API element is subject to removal in a future version.since 2011 - usegetCronJobsToBeAborted(Set, Set, int)instead -
getCronJobsToBeAborted
protected List<org.apache.commons.lang3.tuple.Pair<PK,Integer>> getCronJobsToBeAborted(Set<Integer> staleNodeIds, Set<Integer> allNodeIds, int maxCount) Method gets the running cronjobs that are marked as running on given
staleNodeIdsor is not inallNodeIdsset.If
allNodeIdsis not provided (set is empty or null), the method will return only cronjobs that are marked as running on node instaleNodeIdsset.If
staleNodeIdsis not provided (set is empty or null), the method will return only cronjobs that are marked as running on node not inallNodeIdsset.If both
staleNodeIdsandallNodeIdsare not provided (empty or null), the method will return empty list (the query won't be executed)- Parameters:
staleNodeIds-allNodeIds-maxCount- the max number of entries to be returned. Unlimited if value is equal or less than 0.
-
updateCronJobsStatusToAborted
-
updateCronJobStatusToAborted
-
sendAfterCronJobCrashAbortEvent
-
prepareCrashAbortEvent
-
getActiveTriggers
Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers()Returns aCollectionof all Triggers, whose next activation time (Trigger.getNextTime(long)lies before the current system time.- Returns:
- a
Collectionof all Triggers, whose next activation time (Trigger.getNextTime(long)is smaller than current system time
-
getActiveTriggers
Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers(Calendar)Returns aCollectionof all Triggers, whose next activation time (Trigger.getNextTime(long)lies before the specified date.- Parameters:
date- the date- Returns:
- a
Collectionof all Triggers, whose next activation time (Trigger.getNextTime(long)lies before the specified date
-
createBatchJob
Deprecated.since agesBatchJobis obsolete since 4.3Creates a newBatchJobusing the parameters specified in the paramsMap.- Overrides:
createBatchJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
BatchJobcreated using the parameters specified in the paramsMap
-
createBatchJob
@Deprecated(since="ages", forRemoval=false) public BatchJob createBatchJob(SessionContext ctx, Map params) Deprecated.since agesBatchJobis obsolete since 4.3Creates a newBatchJobusing the parameters specified in the paramsMap.- Overrides:
createBatchJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
BatchJobcreated using the parameters specified in the paramsMap
-
createChangeDescriptor
@Deprecated(since="ages", forRemoval=false) public ChangeDescriptor createChangeDescriptor(Map params) Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationCreates a newChangeDescriptorusing the parameters specified in the paramsMap.- Overrides:
createChangeDescriptorin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
ChangeDescriptorcreated using the parameters specified in the paramsMap
-
createChangeDescriptor
@Deprecated(since="ages", forRemoval=false) public ChangeDescriptor createChangeDescriptor(SessionContext ctx, Map params) Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationCreates a newChangeDescriptorusing the parameters specified in the paramsMap.- Overrides:
createChangeDescriptorin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
ChangeDescriptorcreated using the parameters specified in the paramsMap
-
createCronJob
Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a newCronJobusing the parameters specified in the paramsMap.- Overrides:
createCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CronJobcreated using the parameters specified in the paramsMap
-
createCronJob
@Deprecated(since="ages", forRemoval=false) public CronJob createCronJob(SessionContext ctx, Map params) Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a newCronJobusing the parameters specified in the paramsMap.- Overrides:
createCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CronJobcreated using the parameters specified in the paramsMap
-
createCSVExportStep
Deprecated.since 4.3Stepis obsoleteCreates a newCSVExportStepusing the parameters specified in the paramsMap.- Overrides:
createCSVExportStepin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CSVExportStepcreated using the parameters specified in the paramsMap
-
createCSVExportStep
@Deprecated(since="4.3", forRemoval=false) public CSVExportStep createCSVExportStep(SessionContext ctx, Map params) Deprecated.since 4.3Stepis obsoleteCreates a newCSVExportStepusing the parameters specified in the paramsMap.- Overrides:
createCSVExportStepin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CSVExportStepcreated using the parameters specified in the paramsMap
-
createFlexibleSearchCronJob
@Deprecated(since="ages", forRemoval=false) public FlexibleSearchCronJob createFlexibleSearchCronJob(Map params) Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3Creates a newFlexibleSearchCronJobusing the parameters specified in the paramsMap.- Overrides:
createFlexibleSearchCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
FlexibleSearchCronJobcreated using the parameters specified in the paramsMap
-
createFlexibleSearchCronJob
@Deprecated(since="ages", forRemoval=false) public FlexibleSearchCronJob createFlexibleSearchCronJob(SessionContext ctx, Map params) Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3Creates a newFlexibleSearchCronJobusing the parameters specified in the paramsMap.- Overrides:
createFlexibleSearchCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
FlexibleSearchCronJobcreated using the parameters specified in the paramsMap
-
createGetURLStep
Deprecated.since 4.3Stepis obsoleteCreates a newGetURLStepusing the parameters specified in the paramsMap.- Overrides:
createGetURLStepin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
GetURLStepcreated using the parameters specified in the paramsMap
-
createGetURLStep
@Deprecated(since="4.3", forRemoval=false) public GetURLStep createGetURLStep(SessionContext ctx, Map params) Deprecated.since 4.3Stepis obsoleteCreates a newGetURLStepusing the parameters specified in the paramsMap.- Overrides:
createGetURLStepin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
GetURLStepcreated using the parameters specified in the paramsMap
-
createJobLog
Deprecated.since ages - there should be used aJobLogModeldirectly insteadCreates a newJobLogusing the parameters specified in the paramsMap.- Overrides:
createJobLogin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobLogcreated using the parameters specified in the paramsMap
-
createJobLog
@Deprecated(since="ages", forRemoval=false) public JobLog createJobLog(SessionContext ctx, Map params) Deprecated.since ages - there should be used aJobLogModeldirectly insteadCreates a newJobLogusing the parameters specified in the paramsMap.- Overrides:
createJobLogin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobLogcreated using the parameters specified in the paramsMap
-
createJobMedia
Deprecated.since ages - there should be used aJobMediaModeldirectly insteadCreates a newJobMediausing the parameters specified in the paramsMap.- Overrides:
createJobMediain classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobMediacreated using the parameters specified in the paramsMap
-
createJobMedia
@Deprecated(since="ages", forRemoval=false) public JobMedia createJobMedia(SessionContext ctx, Map params) Deprecated.since ages - there should be used aJobMediaModeldirectly insteadCreates a newJobMediausing the parameters specified in the paramsMap.- Overrides:
createJobMediain classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobMediacreated using the parameters specified in the paramsMap
-
createMediaProcessCronJob
@Deprecated(since="ages", forRemoval=false) public MediaProcessCronJob createMediaProcessCronJob(Map params) Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadCreates a newMediaProcessCronJobusing the parameters specified in the paramsMap.- Overrides:
createMediaProcessCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
MediaProcessCronJobcreated using the parameters specified in the paramsMap
-
createMediaProcessCronJob
@Deprecated(since="ages", forRemoval=false) public MediaProcessCronJob createMediaProcessCronJob(SessionContext ctx, Map params) Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadCreates a newMediaProcessCronJobusing the parameters specified in the paramsMap.- Overrides:
createMediaProcessCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
MediaProcessCronJobcreated using the parameters specified in the paramsMap
-
createTrigger
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates a newTriggerusing the parameters specified in the paramsMap.- Overrides:
createTriggerin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
Triggercreated using the parameters specified in the paramsMap
-
createTrigger
@Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(SessionContext ctx, Map params) Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates a newTriggerusing the parameters specified in the paramsMap. Since 5.5.1 TriggerTask is created additionally.- Overrides:
createTriggerin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
Triggercreated using the parameters specified in the paramsMap
-
createTypeSystemExportJob
@Deprecated(since="ages", forRemoval=false) public TypeSystemExportJob createTypeSystemExportJob(Map params) Deprecated.since agesTypeSystemExportJobis obsolete since 4.3Creates a newTypeSystemExportJobusing the parameters specified in the paramsMap.- Overrides:
createTypeSystemExportJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
TypeSystemExportJobcreated using the parameters specified in the paramsMap
-
createTypeSystemExportJob
@Deprecated(since="ages", forRemoval=false) public TypeSystemExportJob createTypeSystemExportJob(SessionContext ctx, Map params) Deprecated.since agesTypeSystemExportJobis obsolete since 4.3Creates a newTypeSystemExportJobusing the parameters specified in the paramsMap.- Overrides:
createTypeSystemExportJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
TypeSystemExportJobcreated using the parameters specified in the paramsMap
-
createURLCronJob
Deprecated.since agesURLCronJobis obsolete since 4.3Creates a newURLCronJobusing the parameters specified in the paramsMap.- Overrides:
createURLCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
URLCronJobcreated using the parameters specified in the paramsMap
-
createURLCronJob
@Deprecated(since="ages", forRemoval=false) public URLCronJob createURLCronJob(SessionContext ctx, Map params) Deprecated.since agesURLCronJobis obsolete since 4.3Creates a newURLCronJobusing the parameters specified in the paramsMap.- Overrides:
createURLCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
URLCronJobcreated using the parameters specified in the paramsMap
-
getNextConjobNumber
Deprecated.since ages - please usegetNextCronjobNumber()instead! -
getNextCronjobNumber
-
isCreatorDisabled
public boolean isCreatorDisabled()Part ofDataCreatorinterface. Returnsfalse- Overrides:
isCreatorDisabledin classExtension- Returns:
false
-
createEssentialData
- Overrides:
createEssentialDatain classExtension- Throws:
Exception
-
getDefaultCronJobFinishNotificationTemplate
@Deprecated(since="ages", forRemoval=false) public RendererTemplate getDefaultCronJobFinishNotificationTemplate()Deprecated.since ages - useRendererService.getRendererTemplateForCode(String)insteadGets the default notification template for a cronjob. It is set at creation time of a cronjob if no template is provided.- Returns:
- default notification template
- Since:
- 3.1-u7
-
getCronJobMediaFolder
Deprecated.since ages - use plainMediaFolderModelcreation instead, refer to wiki documentationGets the HMC specificMediaFolderused for storing hmc system medias.- Returns:
- folder for hmc specific medias
- Since:
- 3.1-u4
-
findTaskForTrigger
Searches for Task for the given Trigger. -
startTimerTask
Deprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngine -
stopTimerTask
Deprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngine -
notifyInitializationStart
- Overrides:
notifyInitializationStartin classExtension- Throws:
Exception
-
notifyInitializationEnd
- Overrides:
notifyInitializationEndin classExtension- Throws:
Exception
-
getOrCreateMoveMediaJob
Deprecated.since ages - useCronJobService.getJob(String)instead with spring bean ofMoveMediaJobPerformableas parameter value.Gets the central import job instance or creates it if not existent already.- Returns:
- import job instance
-
afterItemCreation
public void afterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes) throws JaloBusinessException Overwritten to trigger re-poll whenever a new task item has been created. Creates also Tasks for Triggers if necessary.- Specified by:
afterItemCreationin interfaceItemLifecycleListener- Overrides:
afterItemCreationin classManager- Parameters:
ctx- the currency session contexttype- the type of the item which will be createdcreatedItem- the created item- Throws:
JaloBusinessException- See Also:
-
startTaskEngine
protected void startTaskEngine()Starts the actual task engine. Internally a polling thread is polling scheduled tasks from database and performs them asynchronously. -
stopTaskEngine
protected void stopTaskEngine()Stops the task engine. From now on scheduled tasks are not longer performed at this platform instance. Please note that other nodes may still be running and perform tasks. -
getTaskEngine
-
createStrandedCronJobsRegistry
-
getStrandedCronJobsRegistry
-
CronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob.