Package org.cyclos.impl.utils.cluster
Class NoClusterPollingTaskHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractGlobalServerComponent
-
- org.cyclos.impl.BaseGlobalHandlerImpl
-
- org.cyclos.impl.utils.tasks.AbstractPollingTaskHandlerImpl
-
- org.cyclos.impl.utils.cluster.NoClusterPollingTaskHandlerImpl
-
- All Implemented Interfaces:
ApplicationInitializationListener,BaseApplicationInitializationListener,PollingTaskHandler,PollingTaskHandlerImplementor
public class NoClusterPollingTaskHandlerImpl extends AbstractPollingTaskHandlerImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected ConcurrentMap<Class<? extends PollingTask>,ScheduledFuture<?>>pollingTaskFutures-
Fields inherited from class org.cyclos.impl.utils.tasks.AbstractPollingTaskHandlerImpl
$, AWAKE_DELAY_IN_MILLIS, invokerHandler, tasksByRecurrenceMap
-
Fields inherited from class org.cyclos.impl.AbstractGlobalServerComponent
rawEntityManagerHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
Fields inherited from interface org.cyclos.impl.BaseApplicationInitializationListener
MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description NoClusterPollingTaskHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawakeNow(PollingTask pollingTask)Awakes the givenPollingTask's thread now.Map<String,Long>getTaskDelays()Returns the remaining delays of the next execution for all tasks in seconds.
If the next execution was cancelled or the task was not scheduled (??) then it won't be included in the map.voidinitialize()voidonApplicationInitialization()Invoked when the application service is initialized-
Methods inherited from class org.cyclos.impl.utils.tasks.AbstractPollingTaskHandlerImpl
dateFromDelay, forEachTask, getFirstExecution, getNextExecution, getRunningTasks, getTask, logFirstExecution, onTaskFinished, onTaskStarted, scheduleAwake
-
Methods inherited from class org.cyclos.impl.AbstractGlobalServerComponent
getBaseEntityManagerHandler, getEntityManager
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.impl.BaseApplicationInitializationListener
applicationInitializationPriority, getInitializationId
-
-
-
-
Field Detail
-
pollingTaskFutures
protected ConcurrentMap<Class<? extends PollingTask>,ScheduledFuture<?>> pollingTaskFutures
-
-
Method Detail
-
awakeNow
public void awakeNow(PollingTask pollingTask)
Description copied from interface:PollingTaskHandlerImplementorAwakes the givenPollingTask's thread now. Not intended to be used by business services, as invoking it within a DB transaction would probably result in data to be processed not yet visible to thePollingTask, which runs in a separated DB transaction.
-
getTaskDelays
public Map<String,Long> getTaskDelays()
Description copied from interface:PollingTaskHandlerReturns the remaining delays of the next execution for all tasks in seconds.
If the next execution was cancelled or the task was not scheduled (??) then it won't be included in the map.
-
initialize
@PostConstruct public void initialize()
-
onApplicationInitialization
public void onApplicationInitialization()
Description copied from interface:ApplicationInitializationListenerInvoked when the application service is initialized- Specified by:
onApplicationInitializationin interfaceApplicationInitializationListener- Overrides:
onApplicationInitializationin classAbstractPollingTaskHandlerImpl
-
-