Package org.cyclos.impl.utils.tasks
Class BackgroundTaskExecutionPollingTask
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractGlobalServerComponent
-
- org.cyclos.impl.utils.tasks.AbstractTask
-
- org.cyclos.impl.utils.tasks.AbstractPollingTask
-
- org.cyclos.impl.utils.tasks.BackgroundTaskExecutionPollingTask
-
- All Implemented Interfaces:
Runnable,PollingTask
@Component public class BackgroundTaskExecutionPollingTask extends AbstractPollingTask
APollingTaskHandlerwhich executes pendingBackgroundTasks
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.utils.tasks.AbstractTask
errorLogService, loggingHandler
-
Fields inherited from class org.cyclos.impl.AbstractGlobalServerComponent
rawEntityManagerHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description BackgroundTaskExecutionPollingTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoRun()Subclasses must implement this method to do the task.protected IntegergetInitialSleepSeconds()The number of seconds before the first execution.StringgetName()Returns the task name-
Methods inherited from class org.cyclos.impl.utils.tasks.AbstractPollingTask
dateFromDelay, getFirstExecution, getNextExecution, getSecondsUntilNextDay, getSecondsUntilNextHour, getSleepSeconds, getStorage, initialize, isExclusiveInCluster, run
-
Methods inherited from class org.cyclos.impl.utils.tasks.AbstractTask
getLogConfiguration, logName, logTaskError, logTaskSuccess, shouldGenerateErrorLog, toString
-
Methods inherited from class org.cyclos.impl.AbstractGlobalServerComponent
getBaseEntityManagerHandler, getEntityManager
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:PollingTaskReturns the task name- Specified by:
getNamein interfacePollingTask- Specified by:
getNamein classAbstractTask
-
doRun
protected void doRun()
Description copied from class:AbstractPollingTaskSubclasses must implement this method to do the task.- Specified by:
doRunin classAbstractPollingTask
-
getInitialSleepSeconds
protected Integer getInitialSleepSeconds()
Description copied from class:AbstractPollingTaskThe number of seconds before the first execution. By default is a random time between 0 andAbstractPollingTask.getSleepSeconds(). If returns null, the polling task is disabled.- Overrides:
getInitialSleepSecondsin classAbstractPollingTask
-
-