com.hazelcast.crdt

## Class AbstractCRDTReplicationOperation<T extends IdentifiedDataSerializable>

- java.lang.Object
- - com.hazelcast.spi.Operation
  - - com.hazelcast.crdt.AbstractCRDTReplicationOperation<T>

- Type Parameters:
    `T` - the CRDT type
  All Implemented Interfaces:
    com.hazelcast.internal.partition.MigrationCycleOperation, DataSerializable, IdentifiedDataSerializable, com.hazelcast.spi.impl.AllowedDuringPassiveState, UrgentSystemOperation
  Direct Known Subclasses:
    PNCounterReplicationOperation

      public abstract class AbstractCRDTReplicationOperation<T extends IdentifiedDataSerializable>
      extends Operation
      implements IdentifiedDataSerializable, com.hazelcast.internal.partition.MigrationCycleOperation

  Base class for CRDT replication operations. It supports replicating a map of `IdentifiedDataSerializable` values. In the case of CRDT replication, this will be a map from map name to CRDT state. Each concrete implementation of this class should be responsible for a single CRDT type and the replication map should only contain CRDT states for this CRDT type.

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.spi.Operation

      `GENERIC_PARTITION_ID`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractCRDTReplicationOperation()`
    `` | `AbstractCRDTReplicationOperation(Map<String,T> replicationData)` Constructs the replication operation.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterRun()`
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `protected void` | `readInternal(ObjectDataInput in)`
    `void` | `run()`
    `protected void` | `writeInternal(ObjectDataOutput out)`

    - ### Methods inherited from class com.hazelcast.spi.Operation

      `beforeRun, call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getResponse, getService, getServiceName, getWaitTimeout, isUrgent, logError, onExecutionFailure, onInvocationException, onSetCallId, readData, returnsResponse, sendResponse, setCallerUuid, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, toString, validatesTarget, writeData`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.hazelcast.nio.serialization.IdentifiedDataSerializable

      `getId`

    - ### Methods inherited from interface com.hazelcast.nio.serialization.DataSerializable

      `readData, writeData`

- - ### Constructor Detail

    - #### AbstractCRDTReplicationOperation

          protected AbstractCRDTReplicationOperation()

    - #### AbstractCRDTReplicationOperation

          public AbstractCRDTReplicationOperation(Map<String,T> replicationData)

      Constructs the replication operation.
      Parameters:
        `replicationData` - the map of CRDT states to replicate

  - ### Method Detail

    - #### run

          public void run()
                   throws Exception

      Overrides:
        `run` in class `Operation`
      Throws:
        `Exception`

    - #### afterRun

          public void afterRun()
                        throws Exception

      Overrides:
        `afterRun` in class `Operation`
      Throws:
        `Exception`

    - #### getFactoryId

          public int getFactoryId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
        `getFactoryId` in interface `IdentifiedDataSerializable`
      Returns:
        factory ID

    - #### writeInternal

          protected void writeInternal(ObjectDataOutput out)
                                throws IOException

      Overrides:
        `writeInternal` in class `Operation`
      Throws:
        `IOException`

    - #### readInternal

          protected void readInternal(ObjectDataInput in)
                               throws IOException

      Overrides:
        `readInternal` in class `Operation`
      Throws:
        `IOException`

Copyright © 2018. All rights reserved.