public class MapClearExpiredRecordsTask extends ClearExpiredRecordsTask<PartitionContainer,RecordStore> implements OperationResponseHandler
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) |
Modifier and Type | Method and Description |
---|---|
boolean |
canPrimaryDriveExpiration() |
protected void |
clearLeftoverExpiredKeyQueues(PartitionContainer container)
This can happen due to the partition ownership changes.
|
protected void |
equalizeBackupSizeWithPrimary(PartitionContainer container) |
protected long |
getLastCleanupTime(PartitionContainer container) |
protected ClearExpiredRecordsTask.ProcessablePartitionType |
getProcessablePartitionType() |
protected boolean |
hasExpiredKeyToSendBackup(PartitionContainer container) |
protected boolean |
hasRunningCleanup(PartitionContainer container) |
protected boolean |
isContainerEmpty(PartitionContainer container) |
protected Operation |
newBackupExpiryOp(RecordStore store,
Collection<ExpiredKey> expiredKeys) |
protected Operation |
newPrimaryExpiryOp(int expirationPercentage,
PartitionContainer container) |
protected boolean |
notHaveAnyExpirableRecord(PartitionContainer partitionContainer)
Here we check if that partition has any expirable record or not,
if no expirable record exists in that partition no need to fire an expiration operation.
|
protected void |
setHasRunningCleanup(PartitionContainer container) |
protected void |
sortPartitionContainers(List<PartitionContainer> partitionContainers) |
Iterator<RecordStore> |
storeIterator(PartitionContainer container) |
String |
toString() |
void |
tryToSendBackupExpiryOp(RecordStore store,
boolean checkIfReachedBatch) |
newBackupExpiryOpFilter, partitionLost, run, sendQueuedExpiredKeys, sendResponse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
sendResponse
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 checkIfReachedBatch)
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 void clearLeftoverExpiredKeyQueues(PartitionContainer container)
clearLeftoverExpiredKeyQueues
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 © 2018 Hazelcast, Inc.. All Rights Reserved.