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
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.)
-
Field Summary
Fields inherited from class pt.unl.fct.di.novasys.babel.protocols.storage.operations.common.CommonOperation
operationType -
Constructor Summary
ConstructorsConstructorDescriptionReplicatedCreateStructOperation(CommonOperationType opType, ReplicatedStructuresOperations.ReplicatedDataTypes dataStructType) Creates a replicated create operation, with the operation type and the type of data structure.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.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. -
Method Summary
Modifier and TypeMethodDescriptionGets the type of the replicated data structure.Gets the initial value (or element) of the replicated data structure.Gets the object identifier.Methods inherited from class pt.unl.fct.di.novasys.babel.protocols.storage.operations.common.CommonOperation
getOperationType
-
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 operationdataStructType- 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 operationdataStructType- 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 operationdataStructType- the type of the data structure to be created.initialValue- an optional initial value to put in the data structureobjectID- 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
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
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.
-