com.hazelcast.util.scheduler
Class EntryTaskSchedulerFactory
java.lang.Object
com.hazelcast.util.scheduler.EntryTaskSchedulerFactory
public final class EntryTaskSchedulerFactory
- extends Object
Factory for EntryTaskSchedulers.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newScheduler
public static <K,V> EntryTaskScheduler<K,V> newScheduler(ScheduledExecutorService scheduledExecutorService,
ScheduledEntryProcessor<K,V> entryProcessor,
ScheduleType scheduleType)
- Creates a new EntryTaskScheduler that will run all second operations in bulk.
Imagine a write-behind map where dirty entries will be stored in bulk.
Note that each key can be only once; meaning you cannot delay the execution
Once an entry is marked as dirty for example, it will run in write-delay-seconds,
even if the entry is updated again within write-delay-seconds.
So two things to
remember:
1. a key cannot be re-scheduled (postponing its execution).
2. all entries scheduled for a given second will be executed in once by your
SecondBulkExecutor implementation.
Once a key is executed, it can be re-scheduled for another execution.
EntryTaskScheduler implementation is thread-safe.
- Parameters:
scheduledExecutorService
- ScheduledExecutorService instance to execute the secondentryProcessor
- bulk processor
- Returns:
- EntryTaskScheduler
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.