public class CacheClearExpiredRecordsTask extends ClearExpiredRecordsTask<CachePartitionSegment> implements OperationResponseHandler
These parameters can be set node-wide or system-wide
Node-wide setting example:
Config config = new Config();
config.setProperty(
"hazelcast.internal.cache.expiration.cleanup.operation.count", "3");
Hazelcast.newHazelcastInstance(config);
System-wide setting example:
System.setProperty(
"hazelcast.internal.cache.expiration.cleanup.operation.count", "3");
| Modifier and Type | Field and Description |
|---|---|
static HazelcastProperty |
CLEANUP_OPERATION_COUNT |
static HazelcastProperty |
CLEANUP_PERCENTAGE |
static int |
DEFAULT_CLEANUP_PERCENTAGE |
static int |
DEFAULT_TASK_PERIOD_SECONDS |
static int |
MAX_EXPIRED_KEY_COUNT_IN_BATCH |
static String |
PROP_CLEANUP_OPERATION_COUNT |
static String |
PROP_CLEANUP_PERCENTAGE |
static String |
PROP_TASK_PERIOD_SECONDS |
static HazelcastProperty |
TASK_PERIOD_SECONDS |
cleanupOperationCount, cleanupPercentage, containers, DIFFERENCE_BETWEEN_TWO_SUBSEQUENT_PARTITION_CLEANUP_MILLIS, nodeEngine, operationService, taskPeriodSeconds| Constructor and Description |
|---|
CacheClearExpiredRecordsTask(NodeEngine nodeEngine,
CachePartitionSegment[] containers) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearLeftoverExpiredKeyQueues(CachePartitionSegment container) |
protected Operation |
createExpirationOperation(int expirationPercentage,
CachePartitionSegment container) |
protected long |
getLastCleanupTime(CachePartitionSegment container) |
protected boolean |
hasExpiredKeyToSendBackup(CachePartitionSegment container) |
protected boolean |
hasRunningCleanup(CachePartitionSegment container) |
protected boolean |
isContainerEmpty(CachePartitionSegment container) |
protected boolean |
notHaveAnyExpirableRecord(CachePartitionSegment container) |
void |
sendResponse(Operation op,
Object response)
Sends a response.
|
protected void |
setHasRunningCleanup(CachePartitionSegment container,
boolean status) |
protected void |
sortPartitionContainers(List<CachePartitionSegment> containers) |
getCleanupOperationCount, run, sendCleanupOperationspublic static final String PROP_CLEANUP_PERCENTAGE
public static final String PROP_CLEANUP_OPERATION_COUNT
public static final String PROP_TASK_PERIOD_SECONDS
public static final int DEFAULT_TASK_PERIOD_SECONDS
public static final HazelcastProperty TASK_PERIOD_SECONDS
public static final int DEFAULT_CLEANUP_PERCENTAGE
public static final int MAX_EXPIRED_KEY_COUNT_IN_BATCH
public static final HazelcastProperty CLEANUP_PERCENTAGE
public static final HazelcastProperty CLEANUP_OPERATION_COUNT
public CacheClearExpiredRecordsTask(NodeEngine nodeEngine, CachePartitionSegment[] containers)
protected boolean hasExpiredKeyToSendBackup(CachePartitionSegment container)
hasExpiredKeyToSendBackup in class ClearExpiredRecordsTask<CachePartitionSegment>protected boolean hasRunningCleanup(CachePartitionSegment container)
hasRunningCleanup in class ClearExpiredRecordsTask<CachePartitionSegment>protected void setHasRunningCleanup(CachePartitionSegment container, boolean status)
setHasRunningCleanup in class ClearExpiredRecordsTask<CachePartitionSegment>protected boolean isContainerEmpty(CachePartitionSegment container)
isContainerEmpty in class ClearExpiredRecordsTask<CachePartitionSegment>protected boolean notHaveAnyExpirableRecord(CachePartitionSegment container)
notHaveAnyExpirableRecord in class ClearExpiredRecordsTask<CachePartitionSegment>protected long getLastCleanupTime(CachePartitionSegment container)
getLastCleanupTime in class ClearExpiredRecordsTask<CachePartitionSegment>protected void clearLeftoverExpiredKeyQueues(CachePartitionSegment container)
clearLeftoverExpiredKeyQueues in class ClearExpiredRecordsTask<CachePartitionSegment>protected void sortPartitionContainers(List<CachePartitionSegment> containers)
sortPartitionContainers in class ClearExpiredRecordsTask<CachePartitionSegment>public void sendResponse(Operation op, Object response)
OperationResponseHandlersendResponse in interface OperationResponseHandlerop - the operation that got executed.response - the response of the operation that got executed.protected Operation createExpirationOperation(int expirationPercentage, CachePartitionSegment container)
createExpirationOperation in class ClearExpiredRecordsTask<CachePartitionSegment>Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.