K - entry key typeV - entry value typepublic final class SecondsBasedEntryTaskScheduler<K,V> extends Object implements EntryTaskScheduler<K,V>
| Modifier and Type | Field and Description |
|---|---|
static double |
FACTOR |
static int |
INITIAL_CAPACITY
hash-map initial capacity
|
| Modifier and Type | Method and Description |
|---|---|
ScheduledEntry<K,V> |
cancel(K key)
Cancel all scheduled executions with the given key.
|
void |
cancelAll()
Cancel all scheduled executions
|
int |
cancelIfExists(K key,
V value)
Cancels the scheduled executions for the given key and value if present.
|
ScheduledEntry<K,V> |
get(K key)
Return the entry for the scheduled key or null if there is none
|
ScheduledEntry<K,V> |
getByCompositeKey(K key)
Returns one scheduled entry for the given
key with no guaranteed ordering |
boolean |
schedule(long delayMillis,
K key,
V value)
Schedules (or reschedules) the execution of given entry.
|
int |
size() |
String |
toString() |
public static final int INITIAL_CAPACITY
public static final double FACTOR
ceilToSecond(long),
Constant Field Valuespublic boolean schedule(long delayMillis,
K key,
V value)
EntryTaskSchedulerschedule in interface EntryTaskScheduler<K,V>delayMillis - milliseconds to delay the execution.key - key of this scheduling.value - user object to pass back when it is time to execute.public ScheduledEntry<K,V> cancel(K key)
EntryTaskSchedulercancel in interface EntryTaskScheduler<K,V>key - the scheduled keypublic int cancelIfExists(K key, V value)
EntryTaskSchedulercancelIfExists in interface EntryTaskScheduler<K,V>key - the scheduled keyvalue - the scheduled valuepublic ScheduledEntry<K,V> get(K key)
EntryTaskSchedulerget in interface EntryTaskScheduler<K,V>public ScheduledEntry<K,V> getByCompositeKey(K key)
key with no guaranteed orderingpublic void cancelAll()
EntryTaskSchedulercancelAll in interface EntryTaskScheduler<K,V>public int size()
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.