@Override public ScheduledEntry<Object, Object> cancelTtlEntry(Object key) { return ttlEvictionScheduler.cancel(key); }
public void clear() { locks.clear(); entryTaskScheduler.cancelAll(); }
@Override public boolean scheduleTtlEntry(long delayMillis, Object key, Object value) { return ttlEvictionScheduler.schedule(delayMillis, key, value); }
/** * @return copy of scheduled replica-sync requests */ List<ScheduledEntry<ReplicaFragmentSyncInfo, Void>> getScheduledReplicaSyncRequests() { final List<ScheduledEntry<ReplicaFragmentSyncInfo, Void>> entries = new ArrayList<ScheduledEntry<ReplicaFragmentSyncInfo, Void>>(); for (ReplicaFragmentSyncInfo syncInfo : replicaSyncRequests) { ScheduledEntry<ReplicaFragmentSyncInfo, Void> entry = replicaSyncTimeoutScheduler.get(syncInfo); if (entry != null) { entries.add(entry); } } return entries; }
/** * Resets the state of the replica synchronization request for the given partition and replica. This will cancel the * scheduled synchronization, clear the ongoing sync flag and release a synchronization permit. * * @param partitionId the partition being synchronized * @param namespace namespace * @param replicaIndex the index of the replica being synchronized */ // called in operation threads public void clearReplicaSyncRequest(int partitionId, ServiceNamespace namespace, int replicaIndex) { ReplicaFragmentSyncInfo syncInfo = new ReplicaFragmentSyncInfo(partitionId, namespace, replicaIndex, null); if (!replicaSyncRequests.remove(syncInfo)) { return; } if (logger.isFinestEnabled()) { logger.finest("Clearing sync replica request for partitionId=" + partitionId + ", replicaIndex=" + replicaIndex + ", namespace=" + namespace); } releaseReplicaSyncPermits(1); replicaSyncTimeoutScheduler.cancelIfExists(syncInfo, null); }
/** * @return copy of scheduled replica-sync requests */ List<ScheduledEntry<ReplicaFragmentSyncInfo, Void>> getScheduledReplicaSyncRequests() { final List<ScheduledEntry<ReplicaFragmentSyncInfo, Void>> entries = new ArrayList<ScheduledEntry<ReplicaFragmentSyncInfo, Void>>(); for (ReplicaFragmentSyncInfo syncInfo : replicaSyncRequests) { ScheduledEntry<ReplicaFragmentSyncInfo, Void> entry = replicaSyncTimeoutScheduler.get(syncInfo); if (entry != null) { entries.add(entry); } } return entries; }
/** * Resets the state of the replica synchronization request for the given partition and replica. This will cancel the * scheduled synchronization, clear the ongoing sync flag and release a synchronization permit. * * @param partitionId the partition being synchronized * @param namespace namespace * @param replicaIndex the index of the replica being synchronized */ // called in operation threads public void clearReplicaSyncRequest(int partitionId, ServiceNamespace namespace, int replicaIndex) { ReplicaFragmentSyncInfo syncInfo = new ReplicaFragmentSyncInfo(partitionId, namespace, replicaIndex, null); if (!replicaSyncRequests.remove(syncInfo)) { return; } if (logger.isFinestEnabled()) { logger.finest("Clearing sync replica request for partitionId=" + partitionId + ", replicaIndex=" + replicaIndex + ", namespace=" + namespace); } releaseReplicaSyncPermits(1); replicaSyncTimeoutScheduler.cancelIfExists(syncInfo, null); }
void cancelEviction(Data key) { entryTaskScheduler.cancel(key); }
public void clear() { locks.clear(); entryTaskScheduler.cancelAll(); }
public void scheduleEviction(String name, long delay) { queueEvictionScheduler.schedule(delay, name, null); }
public void cancelEviction(String name) { queueEvictionScheduler.cancel(name); }
void reset() { replicaSyncRequests.clear(); replicaSyncTimeoutScheduler.cancelAll(); // this is not sync with possibly running sync process // permit count can exceed allowed parallelization count. replicaSyncSemaphore.drainPermits(); replicaSyncSemaphore.release(maxParallelReplications); }
@Override public boolean scheduleTtlEntry(long delayMillis, Object key, Object value) { return ttlEvictionScheduler.schedule(delayMillis, key, value); }
void cancelEviction(Data key) { entryTaskScheduler.cancel(key); }
void reset() { replicaSyncRequests.clear(); replicaSyncTimeoutScheduler.cancelAll(); // this is not sync with possibly running sync process // permit count can exceed allowed parallelization count. replicaSyncSemaphore.drainPermits(); replicaSyncSemaphore.release(maxParallelReplications); }
void scheduleEviction(Data key, int version, long leaseTime) { entryTaskScheduler.schedule(leaseTime, key, version); }
@Override public ScheduledEntry<Object, Object> cancelTtlEntry(Object key) { return ttlEvictionScheduler.cancel(key); }
@Override public void destroy() { InternalReplicatedMapStorage storage = storageRef.getAndSet(new InternalReplicatedMapStorage<K, V>()); if (storage != null) { storage.clear(); } ttlEvictionScheduler.cancelAll(); }
void scheduleEviction(Data key, int version, long leaseTime) { entryTaskScheduler.schedule(leaseTime, key, version); }
public void cancelEviction(String name) { queueEvictionScheduler.cancel(name); }