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

public class ReplicatedOperation extends CommonOperation
An operation to performed on top of replicated data structure on the storage layer. The operation contains information about the object identifier, the operation to be executed on top of the replicated data structure (see more information on ReplicatedStructuresOperations) as well as the value to be applied on the operation. This operation is meant to be used when adding, updating, reading or deleting objects inside a previously created replicated data structure.
  • Constructor Details

    • ReplicatedOperation

      public ReplicatedOperation(CommonOperationType opType, String objectID, ReplicatedStructuresOperations operation, Object value)
      Creates a replicated operation, with the operation type (e.g., CREATE, READ, etc .), the object identifier, the type of operation on top of the data structure (e.g., SET_ADD, MAP_PUT, etc.) and the value to be applied in the operation.
      Parameters:
      opType - the type of the operation
      objectID - the object identifier
      operation - the type of operation on top of the data structure
      value - the value to be applied
    • ReplicatedOperation

      public ReplicatedOperation(CommonOperationType opType, String objectID, ReplicatedStructuresOperations operation)
      Creates a replicated operation, with the operation type (e.g., CREATE, READ, etc .), the object identifier, the type of operation on top of the data structure (e.g., SET_ADD, MAP_PUT, etc.).
      Parameters:
      opType - the type of the operation
      objectID - the object identifier
      operation - the type of operation on top of the data structure
  • Method Details

    • getObjectID

      public String getObjectID()
      Gets the object identifier
      Returns:
      the object identifier
    • getStructureOperation

      public ReplicatedStructuresOperations getStructureOperation()
      Get the type operation being performed on top of the data structure.
      Returns:
      the type operation being performed on top of the data structure.
    • getValue

      public Object getValue()
      The value to be applied on the operation.
      Returns:
      value to be applied on the operation.