com.hazelcast.util.scheduler
Class EntryTaskSchedulerFactory

java.lang.Object
  extended by com.hazelcast.util.scheduler.EntryTaskSchedulerFactory

public final class EntryTaskSchedulerFactory
extends Object

Factory for EntryTaskSchedulers.


Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 second
entryProcessor - bulk processor
Returns:
EntryTaskScheduler


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.