Class GetDocumentMessage
java.lang.Object
com.yahoo.messagebus.Routable
com.yahoo.messagebus.Message
com.yahoo.documentapi.messagebus.protocol.DocumentMessage
com.yahoo.documentapi.messagebus.protocol.GetDocumentMessage
- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorsConstructorDescriptionGetDocumentMessage(com.yahoo.document.DocumentId documentId) Constructs a new document get message.GetDocumentMessage(com.yahoo.document.DocumentId documentId, String fieldSet) Constructs a new document get message. -
Method Summary
Modifier and TypeMethodDescriptionCreates and returns a reply to this message.intReturns non-null if the document should be get from a specific replica.com.yahoo.document.DocumentIdReturns the identifier of the document to retrieve.intgetType()booleanvoidsetDebugReplicaNodeId(Integer debugReplicaNodeId) Sets the node ID of the replica to read from, for debugging purposes.voidsetDocumentId(com.yahoo.document.DocumentId documentId) Sets the identifier of the document to retrieve.Methods inherited from class com.yahoo.documentapi.messagebus.protocol.DocumentMessage
getPriority, getProtocol, setPriority, swapStateMethods inherited from class com.yahoo.messagebus.Message
getBucketSequence, getRetry, getRetryEnabled, getRoute, getSequenceId, getTimeReceived, getTimeRemaining, getTimeRemainingNow, hasBucketSequence, hasSequenceId, isExpired, setRetry, setRetryEnabled, setRoute, setTimeReceived, setTimeReceivedNow, setTimeRemainingMethods inherited from class com.yahoo.messagebus.Routable
discard, getCallStack, getContext, getTrace, popHandler, pushHandler, setContext
-
Constructor Details
-
GetDocumentMessage
public GetDocumentMessage(com.yahoo.document.DocumentId documentId) Constructs a new document get message.- Parameters:
documentId- The identifier of the document to get.
-
GetDocumentMessage
Constructs a new document get message.- Parameters:
documentId- The identifier of the document to get.fieldSet- Which fields to retrieve from the document
-
-
Method Details
-
getDocumentId
public com.yahoo.document.DocumentId getDocumentId()Returns the identifier of the document to retrieve.- Returns:
- The document id.
-
setDocumentId
public void setDocumentId(com.yahoo.document.DocumentId documentId) Sets the identifier of the document to retrieve.- Parameters:
documentId- The document id to set.
-
getFieldSet
-
setDebugReplicaNodeId
Sets the node ID of the replica to read from, for debugging purposes. If non-null, the document will be fetched from the specified replica.- Parameters:
debugReplicaNodeId- the node ID of the replica to get the document from
-
getDebugReplicaNodeId
Returns non-null if the document should be get from a specific replica. -
hasDebugReplicaNodeId
public boolean hasDebugReplicaNodeId() -
createReply
Description copied from class:DocumentMessageCreates and returns a reply to this message.- Specified by:
createReplyin classDocumentMessage- Returns:
- The created reply.
-
getApproxSize
public int getApproxSize()- Overrides:
getApproxSizein classDocumentMessage
-
getType
public int getType()- Specified by:
getTypein classcom.yahoo.messagebus.Routable
-