public class MapClearExpiredRecordsTask extends ClearExpiredRecordsTask<PartitionContainer,RecordStore>
These parameters can be set node-wide or system-wide
Node-wide setting example:
Config config = new Config(); config.setProperty( , "3"); Hazelcast.newHazelcastInstance(config);
System-wide setting example:
System.setProperty( , "3");
ClearExpiredRecordsTask.ProcessablePartitionType
Modifier and Type | Field and Description |
---|---|
static String |
PROP_CLEANUP_OPERATION_COUNT |
static String |
PROP_CLEANUP_PERCENTAGE |
static String |
PROP_PRIMARY_DRIVES_BACKUP |
static String |
PROP_TASK_PERIOD_SECONDS |
containers, nodeEngine, partitionService, toBackupSender
Constructor and Description |
---|
MapClearExpiredRecordsTask(PartitionContainer[] containers,
NodeEngine nodeEngine) |
newBackupExpiryOpFilter, partitionLost, run, sendQueuedExpiredKeys
public static final String PROP_PRIMARY_DRIVES_BACKUP
public static final String PROP_CLEANUP_PERCENTAGE
public static final String PROP_CLEANUP_OPERATION_COUNT
public static final String PROP_TASK_PERIOD_SECONDS
public MapClearExpiredRecordsTask(PartitionContainer[] containers, NodeEngine nodeEngine)
public boolean canPrimaryDriveExpiration()
public void tryToSendBackupExpiryOp(RecordStore store, boolean sendIfAtBatchSize)
tryToSendBackupExpiryOp
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
public Iterator<RecordStore> storeIterator(PartitionContainer container)
storeIterator
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected Operation newPrimaryExpiryOp(int expirationPercentage, PartitionContainer container)
newPrimaryExpiryOp
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected Operation newBackupExpiryOp(RecordStore store, Collection<ExpiredKey> expiredKeys)
newBackupExpiryOp
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected void sortPartitionContainers(List<PartitionContainer> partitionContainers)
sortPartitionContainers
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected ClearExpiredRecordsTask.ProcessablePartitionType getProcessablePartitionType()
getProcessablePartitionType
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected void equalizeBackupSizeWithPrimary(PartitionContainer container)
equalizeBackupSizeWithPrimary
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected boolean hasExpiredKeyToSendBackup(PartitionContainer container)
hasExpiredKeyToSendBackup
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected boolean hasRunningCleanup(PartitionContainer container)
hasRunningCleanup
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected void setHasRunningCleanup(PartitionContainer container)
setHasRunningCleanup
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected boolean notHaveAnyExpirableRecord(PartitionContainer partitionContainer)
notHaveAnyExpirableRecord
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
partitionContainer
- corresponding partition container.true
if no expirable record in that
partition false
otherwise.protected boolean isContainerEmpty(PartitionContainer container)
isContainerEmpty
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
protected long getLastCleanupTime(PartitionContainer container)
getLastCleanupTime
in class ClearExpiredRecordsTask<PartitionContainer,RecordStore>
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.