Class CreateCollectionReply

java.lang.Object
pt.unl.fct.di.novasys.babel.generic.ProtoIPC
pt.unl.fct.di.novasys.babel.generic.ProtoReply
pt.unl.fct.di.novasys.babel.protocols.storage.replies.common.CommonReply
pt.unl.fct.di.novasys.babel.protocols.storage.replies.CreateCollectionReply
Direct Known Subclasses:
DeleteCollectionReply

public class CreateCollectionReply extends CommonReply
A reply issued by a creation of a collection in a given keySpace. The reply contains the identifers of the collection and the respective keySpace, as well information about the status of the operation issued in the corresponding request, as well as an optional message detailing the result.
  • Field Details

  • Constructor Details

    • CreateCollectionReply

      public CreateCollectionReply(CommonOperationStatus status)
      Creates a create collection reply with a given status.
      Parameters:
      status - the status of the reply.
    • CreateCollectionReply

      public CreateCollectionReply(CommonOperationStatus status, String message)
      Creates a create collection reply with a given status an a message detailing the status.
      Parameters:
      status - the status of the reply.
      message - a message detailing the status.
    • CreateCollectionReply

      public CreateCollectionReply(String keySpace, String collectionID, CommonOperationStatus status)
      Creates a create collection reply with a given status, as well as the keySpace and collection identifiers.
      Parameters:
      keySpace - keySpace of the creating created
      collectionID - the collection identifier
      status - the status of the reply.
    • CreateCollectionReply

      public CreateCollectionReply(String keySpace, String collectionID, CommonOperationStatus status, String message)
      Creates a create collection reply with a given status, as well as the keySpace and collection identifiers. The message should contain the details of the status passed.
      Parameters:
      keySpace - keySpace of the creating created
      collectionID - the collection identifier
      status - the status of the reply.
      message - a message detailing the status.
    • CreateCollectionReply

      public CreateCollectionReply(String keySpace, String collectionID, CommonOperationStatus status, String message, String reqID)
      Creates a create collection reply with a given status, as well as the keySpace and collection identifiers. The message should contain the details of the status passed. Additionally, the reply also stores the request identifier associated with the reply.
      Parameters:
      keySpace - keySpace of the creating created
      collectionID - the collection identifier
      status - the status of the reply.
      message - a message detailing the status.
      reqID - the request identifier associated with the reply.
  • Method Details

    • getCollectionID

      public String getCollectionID()
      Gets the collection identifier, if one as passed.
      Returns:
      the collection identifier, or null, if none was passed in the constructor.
    • getKeySpace

      public String getKeySpace()
      Gets the keySpace identifier of the collection, if one as passed.
      Returns:
      the keySpace identifier, or null, if none was passed in the constructor.