Class ReplicatedCreateStructOperation

java.lang.Object
pt.unl.fct.di.novasys.babel.protocols.storage.operations.common.CommonOperation
pt.unl.fct.di.novasys.babel.protocols.storage.operations.ReplicatedCreateStructOperation

public class ReplicatedCreateStructOperation extends CommonOperation
An operation to create a replicated object on the storage layer. The operation contains the type of operation being issued (e.g., CREATE) as well as the type of replicated data structure to be created (e.g., SET, LIST, etc.)
  • Constructor Details

    • ReplicatedCreateStructOperation

      public ReplicatedCreateStructOperation(CommonOperationType opType, ReplicatedStructuresOperations.ReplicatedDataTypes dataStructType, String objectID)
      Creates a replicated create operation, with the operation type, the type of data structure and the object identifier.
      Parameters:
      opType - the type of the operation
      dataStructType - the type of the data structure to be created.
      objectID - the object identifier
    • ReplicatedCreateStructOperation

      public ReplicatedCreateStructOperation(CommonOperationType opType, ReplicatedStructuresOperations.ReplicatedDataTypes dataStructType)
      Creates a replicated create operation, with the operation type and the type of data structure.
      Parameters:
      opType - the type of the operation
      dataStructType - the type of the data structure to be created.
    • ReplicatedCreateStructOperation

      public ReplicatedCreateStructOperation(CommonOperationType opType, ReplicatedStructuresOperations.ReplicatedDataTypes dataStructType, Object initialValue, String objectID)
      Creates a replicated create operation, with the operation type, the type of data structure, the object identifier and an initial value.
      Parameters:
      opType - the type of the operation
      dataStructType - the type of the data structure to be created.
      initialValue - an optional initial value to put in the data structure
      objectID - the unique identifier of the structure
  • Method Details

    • getDataType

      Gets the type of the replicated data structure.
      Returns:
      the type of the replicated data structure.
    • getInitialValue

      public Object getInitialValue()
      Gets the initial value (or element) of the replicated data structure. If none was passed on the constructor, null is returned.
      Returns:
      the initial value (or element) of the replicated data structure, of none if none was passed on the constructor.
    • getObjectID

      public String getObjectID()
      Gets the object identifier. If none was passed during the constructor, null is returned.
      Returns:
      the object identifier, or null if none was passed on to the constructor.