Class LocalSchedulerService<K>
java.lang.Object
org.wildfly.clustering.server.service.SimpleService
org.wildfly.clustering.server.local.scheduler.LocalSchedulerService<K>
- Type Parameters:
K- the scheduled entry key type
- All Implemented Interfaces:
AutoCloseable, Runnable, Scheduler<K,Instant>, SchedulerService<K, Instant>, Service
public class LocalSchedulerService<K>
extends SimpleService
implements SchedulerService<K,Instant>, Runnable
Scheduler that uses a single scheduled task in concert with a
ScheduledEntries.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceEncapsulates configuration of aLocalSchedulerService. -
Constructor Summary
ConstructorsConstructorDescriptionLocalSchedulerService(LocalSchedulerService.Configuration<K> configuration) Creates a local scheduler using the specified configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels a previously scheduled task for the entry with the specified key.voidclose()booleanIndicates whether the entry with the specified key is scheduled.voidrun()voidSchedules a task for the specified entry.voidstart()Starts this service.voidstop()Stops this service.toString()Methods inherited from class SimpleService
isStartedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface SchedulerService
compose
-
Constructor Details
-
LocalSchedulerService
Creates a local scheduler using the specified configuration.- Parameters:
configuration- the scheduler configuration
-
-
Method Details
-
schedule
-
cancel
-
contains
Description copied from interface:SchedulerIndicates whether the entry with the specified key is scheduled. -
start
public void start()Description copied from interface:ServiceStarts this service.- Specified by:
startin interfaceService- Overrides:
startin classSimpleService
-
stop
public void stop()Description copied from interface:ServiceStops this service.- Specified by:
stopin interfaceService- Overrides:
stopin classSimpleService
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSchedulerService<K,Instant>
-
run
-
toString
-