public final class ExpirationManager extends Object implements OperationResponseHandler, LifecycleListener
This background task can be accelerated or can be slowed down by using the system properties below:
These parameters can be set node-wide or system-wide
Node-wide setting example:
          Config config = new Config();
          config.setProperty(
          "hazelcast.internal.map.expiration.cleanup.operation.count", "3");
          Hazelcast.newHazelcastInstance(config);
      
 
 System-wide setting example:
       System.setProperty(
       "hazelcast.internal.map.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 boolean | DEFAULT_PRIMARY_DRIVES_BACKUP | 
| static int | DEFAULT_TASK_PERIOD_SECONDS | 
| static int | DIFFERENCE_BETWEEN_TWO_SUBSEQUENT_PARTITION_CLEANUP_MILLIS | 
| static int | MAX_EXPIRED_KEY_COUNT_IN_BATCH | 
| static HazelcastProperty | PRIMARY_DRIVES_BACKUP | 
| static String | PROP_CLEANUP_OPERATION_COUNT | 
| static String | PROP_CLEANUP_PERCENTAGE | 
| static String | PROP_PRIMARY_DRIVES_BACKUP | 
| static String | PROP_TASK_PERIOD_SECONDS | 
| static HazelcastProperty | TASK_PERIOD_SECONDS | 
| Constructor and Description | 
|---|
| ExpirationManager(PartitionContainer[] partitionContainers,
                 NodeEngine nodeEngine) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canPrimaryDriveExpiration() | 
| void | onClusterStateChange(ClusterState newState) | 
| void | scheduleExpirationTask()Starts scheduling of the task that clears expired entries. | 
| void | sendExpiredKeysToBackups(RecordStore recordStore,
                        boolean checkIfReachedBatch) | 
| void | sendResponse(Operation op,
            Object response)Sends a response. | 
| void | stateChanged(LifecycleEvent event)Called when instance's state changes. | 
public static final String PROP_PRIMARY_DRIVES_BACKUP
public static final String PROP_TASK_PERIOD_SECONDS
public static final String PROP_CLEANUP_PERCENTAGE
public static final String PROP_CLEANUP_OPERATION_COUNT
public static final boolean DEFAULT_PRIMARY_DRIVES_BACKUP
public static final int DEFAULT_TASK_PERIOD_SECONDS
public static final int DEFAULT_CLEANUP_PERCENTAGE
public static final int MAX_EXPIRED_KEY_COUNT_IN_BATCH
public static final int DIFFERENCE_BETWEEN_TWO_SUBSEQUENT_PARTITION_CLEANUP_MILLIS
public static final HazelcastProperty PRIMARY_DRIVES_BACKUP
public static final HazelcastProperty TASK_PERIOD_SECONDS
public static final HazelcastProperty CLEANUP_PERCENTAGE
public static final HazelcastProperty CLEANUP_OPERATION_COUNT
public ExpirationManager(PartitionContainer[] partitionContainers, NodeEngine nodeEngine)
public void scheduleExpirationTask()
public void stateChanged(LifecycleEvent event)
LifecycleListenerstateChanged in interface LifecycleListenerevent - the Lifecycle eventpublic void onClusterStateChange(ClusterState newState)
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.public boolean canPrimaryDriveExpiration()
public void sendExpiredKeysToBackups(RecordStore recordStore, boolean checkIfReachedBatch)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.