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
Direct Known Subclasses:
CreateCollectionRequest, CreateKeySpaceRequest, DeleteCollectionRequest, DeleteKeySpaceRequest, ExecuteRequest, ModifyCollectionRequest, ModifyKeySpaceRequest

public abstract class CommonRequest extends pt.unl.fct.di.novasys.babel.generic.ProtoRequest
A request common to all requests issued on the storage layer. The request stores the keySpace where the request is being issued, as well as an optional operationID. The operationID can be used by the upper layer to associate a reply with the request that issued it.
  • 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 String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CommonRequest(String keySpace, short requestID)
    Construct a common request with the keySpace and protocol identifier.
    CommonRequest(String keySpace, String opID, short requestID)
    Construct a common request with the keySpace and protocol identifier, as well as the unique requestID.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the keySpace where the operation is being issued.
    Gets the operation identifier associated with the request.
    boolean
    Checks if the request has an operation identifier.

    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

    • CommonRequest

      public CommonRequest(String keySpace, short requestID)
      Construct a common request with the keySpace and protocol identifier.
      Parameters:
      keySpace - the keySpace identifier
      requestID - the protocol identifier
    • CommonRequest

      public CommonRequest(String keySpace, String opID, short requestID)
      Construct a common request with the keySpace and protocol identifier, as well as the unique requestID. This requestID can later on be passed by the reply to allow the upper layers to connect a request it is reply.
      Parameters:
      keySpace - the keySpace identifier
      opID - the operation identifier associated with the request
      requestID - the request identifier
  • Method Details

    • getKeySpace

      public String getKeySpace()
      Gets the keySpace where the operation is being issued.
      Returns:
      the keySpace
    • getOpID

      public String getOpID()
      Gets the operation identifier associated with the request. If none was passed in the construct, an empty string is returned.
      Returns:
      the operation identifier or an empty string, if none was passed in the constructor.
    • hasOpID

      public boolean hasOpID()
      Checks if the request has an operation identifier.
      Returns:
      true if the request has an identifier, of false otherwise.