public abstract class ClearExpiredRecordsTask<T,S> extends Object implements Runnable
Modifier and Type | Class and Description |
---|---|
protected static class |
ClearExpiredRecordsTask.ProcessablePartitionType
Used when traversing partitions.
|
Modifier and Type | Field and Description |
---|---|
protected T[] |
containers |
protected NodeEngine |
nodeEngine |
protected IPartitionService |
partitionService |
protected ToBackupSender<S> |
toBackupSender |
Modifier | Constructor and Description |
---|---|
protected |
ClearExpiredRecordsTask(String serviceName,
T[] containers,
HazelcastProperty cleanupOpProperty,
HazelcastProperty cleanupPercentageProperty,
HazelcastProperty taskPeriodProperty,
NodeEngine nodeEngine) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
equalizeBackupSizeWithPrimary(T container) |
protected abstract long |
getLastCleanupTime(T container) |
protected abstract ClearExpiredRecordsTask.ProcessablePartitionType |
getProcessablePartitionType() |
protected abstract boolean |
hasExpiredKeyToSendBackup(T container) |
protected abstract boolean |
hasRunningCleanup(T container) |
protected abstract boolean |
isContainerEmpty(T container) |
protected abstract Operation |
newBackupExpiryOp(S store,
Collection<ExpiredKey> expiredKeys) |
protected IBiFunction<Integer,Integer,Boolean> |
newBackupExpiryOpFilter() |
protected abstract Operation |
newPrimaryExpiryOp(int cleanupPercentage,
T container) |
protected abstract boolean |
notHaveAnyExpirableRecord(T container) |
void |
partitionLost(PartitionLostEvent ignored)
This method increments a counter to count partition lost events.
|
void |
run() |
void |
sendQueuedExpiredKeys(T container) |
protected abstract void |
setHasRunningCleanup(T container) |
protected abstract void |
sortPartitionContainers(List<T> containers) |
abstract Iterator<S> |
storeIterator(T container) |
abstract void |
tryToSendBackupExpiryOp(S store,
boolean sendIfAtBatchSize) |
protected final T[] containers
protected final NodeEngine nodeEngine
protected final ToBackupSender<S> toBackupSender
protected final IPartitionService partitionService
protected ClearExpiredRecordsTask(String serviceName, T[] containers, HazelcastProperty cleanupOpProperty, HazelcastProperty cleanupPercentageProperty, HazelcastProperty taskPeriodProperty, NodeEngine nodeEngine)
protected IBiFunction<Integer,Integer,Boolean> newBackupExpiryOpFilter()
public final void partitionLost(PartitionLostEvent ignored)
public final void sendQueuedExpiredKeys(T container)
protected abstract boolean isContainerEmpty(T container)
protected abstract boolean hasRunningCleanup(T container)
protected abstract long getLastCleanupTime(T container)
protected abstract void equalizeBackupSizeWithPrimary(T container)
protected abstract boolean hasExpiredKeyToSendBackup(T container)
protected abstract boolean notHaveAnyExpirableRecord(T container)
protected abstract void setHasRunningCleanup(T container)
protected abstract ClearExpiredRecordsTask.ProcessablePartitionType getProcessablePartitionType()
protected abstract Operation newPrimaryExpiryOp(int cleanupPercentage, T container)
protected abstract Operation newBackupExpiryOp(S store, Collection<ExpiredKey> expiredKeys)
public abstract void tryToSendBackupExpiryOp(S store, boolean sendIfAtBatchSize)
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.