Class CreateCollectionRequest

java.lang.Object
pt.unl.fct.di.novasys.babel.generic.ProtoIPC
pt.unl.fct.di.novasys.babel.generic.ProtoRequest
pt.unl.fct.di.novasys.babel.protocols.storage.requests.common.CommonRequest
pt.unl.fct.di.novasys.babel.protocols.storage.requests.CreateCollectionRequest

public class CreateCollectionRequest extends CommonRequest
A request issued by the application to create a collection in a given keyspace. The request contains information about the keyspace in question as well as the collection that is going to be created.
  • Nested Class Summary

    Nested classes/interfaces inherited from class pt.unl.fct.di.novasys.babel.generic.ProtoIPC

    pt.unl.fct.di.novasys.babel.generic.ProtoIPC.Type
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
     

    Fields inherited from class pt.unl.fct.di.novasys.babel.protocols.storage.requests.common.CommonRequest

    EMPTY_MSG
  • Constructor Summary

    Constructors
    Constructor
    Description
    CreateCollectionRequest(String keySpace, String collection)
    Creates a create collection request with the keyspace, the collection identifier and a set of optional properties for the creation of he collection.
    CreateCollectionRequest(String keySpace, String collection, String opID)
    Creates a create collection request with the keyspace, the collection identifier.
    CreateCollectionRequest(String keySpace, String collection, String opID, Properties properties)
    Creates a create collection request with the keySpace, the collection identifier and a set of optional properties for the creation of he collection.
    CreateCollectionRequest(String keySpace, String collection, Properties properties)
    Creates a create collection request with the keyspace, the collection identifier and a set of optional properties for the creation of he collection.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the collection identifier.
    Gets the properties for the creation of the collection.

    Methods inherited from class pt.unl.fct.di.novasys.babel.protocols.storage.requests.common.CommonRequest

    getKeySpace, getOpID, hasOpID

    Methods inherited from class pt.unl.fct.di.novasys.babel.generic.ProtoRequest

    getId

    Methods inherited from class pt.unl.fct.di.novasys.babel.generic.ProtoIPC

    getType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • CreateCollectionRequest

      public CreateCollectionRequest(String keySpace, String collection, Properties properties)
      Creates a create collection request with the keyspace, the collection identifier and a set of optional properties for the creation of he collection.
      Parameters:
      keySpace - the keyspace of the collection.
      collection - the collection identifier.
      properties - optional properties for the creation of the collection.
    • CreateCollectionRequest

      public CreateCollectionRequest(String keySpace, String collection)
      Creates a create collection request with the keyspace, the collection identifier and a set of optional properties for the creation of he collection.
      Parameters:
      keySpace - the keyspace of the collection.
      collection - the collection identifier.
    • CreateCollectionRequest

      public CreateCollectionRequest(String keySpace, String collection, String opID, Properties properties)
      Creates a create collection request with the keySpace, the collection identifier and a set of optional properties for the creation of he collection. Additionally, a operationID is passed to identify the operation that issued this request.
      Parameters:
      keySpace - the keySpace of the collection.
      collection - the collection identifier.
      opID - the unique operation identifier that issued this request
      properties - optional properties for the creation of the collection.
    • CreateCollectionRequest

      public CreateCollectionRequest(String keySpace, String collection, String opID)
      Creates a create collection request with the keyspace, the collection identifier. Additionally, a operationID is passed to identify the operation that issed this request.
      Parameters:
      keySpace - the keySpace of the collection.
      collection - the collection identifier.
      opID - the unique operation identifier that issued this request
  • Method Details

    • getProperties

      public Properties getProperties()
      Gets the properties for the creation of the collection. If no properties were passed in the constructor, this method returns null.
      Returns:
      the properties of the collection, or null if none were passed in the constructor.
    • getCollection

      public String getCollection()
      Gets the collection identifier.
      Returns:
      the collection identifier.