Search in sources :

Example 1 with ReplicationOperation

use of com.hazelcast.replicatedmap.impl.operation.ReplicationOperation in project hazelcast by hazelcast.

the class ReplicatedMapService method prepareReplicationOperation.

@Override
public Operation prepareReplicationOperation(PartitionReplicationEvent event) {
    if (nodeEngine.getLocalMember().isLiteMember()) {
        return null;
    }
    if (event.getReplicaIndex() > 0) {
        return null;
    }
    PartitionContainer container = partitionContainers[event.getPartitionId()];
    SerializationService serializationService = nodeEngine.getSerializationService();
    ReplicationOperation operation = new ReplicationOperation(serializationService, container, event.getPartitionId());
    operation.setService(this);
    return operation.isEmpty() ? null : operation;
}
Also used : SerializationService(com.hazelcast.internal.serialization.SerializationService) ReplicationOperation(com.hazelcast.replicatedmap.impl.operation.ReplicationOperation)

Aggregations

SerializationService (com.hazelcast.internal.serialization.SerializationService)1 ReplicationOperation (com.hazelcast.replicatedmap.impl.operation.ReplicationOperation)1