com.hazelcast.cache.impl.operation
Class CacheReplicationOperation
java.lang.Object
com.hazelcast.spi.Operation
com.hazelcast.spi.AbstractOperation
com.hazelcast.cache.impl.operation.CacheReplicationOperation
- All Implemented Interfaces:
- DataSerializable, RemotePropagatable<Operation>
public class CacheReplicationOperation
- extends AbstractOperation
Replication operation is the data migration operation of CacheRecordStore
.
Cache record store's records and configurations will be migrated into their new nodes.
Steps;
- Serialize all non expired data.
- Deserialize the data and config.
- Create the configuration in the new node service.
- Insert each record into
ICacheRecordStore
.
Note: This operation is a per partition operation.
Methods inherited from class com.hazelcast.spi.Operation |
getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getExecutorName, getInvocationTime, getLogger, getNodeEngine, getPartitionId, getReplicaIndex, getResponseHandler, getService, getWaitTimeout, isUrgent, logError, onException, readData, setCallerUuid, setExecutorName, setNodeEngine, setPartitionId, setReplicaIndex, setResponseHandler, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeData |
data
protected Map<String,Map<Data,CacheRecord>> data
configs
protected List<CacheConfig> configs
CacheReplicationOperation
public CacheReplicationOperation()
CacheReplicationOperation
public CacheReplicationOperation(CachePartitionSegment segment,
int replicaIndex)
beforeRun
public void beforeRun()
throws Exception
- Overrides:
beforeRun
in class AbstractOperation
- Throws:
Exception
run
public void run()
throws Exception
- Specified by:
run
in class Operation
- Throws:
Exception
getServiceName
public String getServiceName()
- Overrides:
getServiceName
in class Operation
writeInternal
protected void writeInternal(ObjectDataOutput out)
throws IOException
- Overrides:
writeInternal
in class AbstractOperation
- Throws:
IOException
readInternal
protected void readInternal(ObjectDataInput in)
throws IOException
- Overrides:
readInternal
in class AbstractOperation
- Throws:
IOException
isEmpty
public boolean isEmpty()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.