Class PutDocumentMessage
java.lang.Object
com.yahoo.messagebus.Routable
com.yahoo.messagebus.Message
com.yahoo.documentapi.messagebus.protocol.DocumentMessage
com.yahoo.documentapi.messagebus.protocol.TestAndSetMessage
com.yahoo.documentapi.messagebus.protocol.PutDocumentMessage
- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorDescriptionPutDocumentMessage
(com.yahoo.document.DocumentPut put) Constructs a new document put messagePutDocumentMessage
(LazyDecoder decoder, com.yahoo.document.serialization.DocumentDeserializer buffer) Constructs a new message from a byte buffer. -
Method Summary
Modifier and TypeMethodDescriptionstatic PutDocumentMessage
Creates an empty PutDocumentMessageCreates and returns a reply to this message.int
com.yahoo.document.TestAndSetCondition
com.yahoo.document.DocumentPut
Returns the document put operationlong
long
Returns the timestamp of the document to putint
getType()
boolean
void
setCondition
(com.yahoo.document.TestAndSetCondition condition) void
setDocumentPut
(com.yahoo.document.DocumentPut put) Sets the document to putvoid
setTimestamp
(long time) Sets the timestamp of the document to putMethods inherited from class com.yahoo.documentapi.messagebus.protocol.DocumentMessage
getLoadType, getPriority, getProtocol, setLoadType, setPriority, swapState
Methods inherited from class com.yahoo.messagebus.Message
getBucketSequence, getRetry, getRetryEnabled, getRoute, getTimeReceived, getTimeRemaining, getTimeRemainingNow, hasBucketSequence, isExpired, setRetry, setRetryEnabled, setRoute, setTimeReceived, setTimeReceivedNow, setTimeRemaining
Methods inherited from class com.yahoo.messagebus.Routable
discard, getCallStack, getContext, getTrace, popHandler, pushHandler, setContext
-
Constructor Details
-
PutDocumentMessage
public PutDocumentMessage(LazyDecoder decoder, com.yahoo.document.serialization.DocumentDeserializer buffer) Constructs a new message from a byte buffer.- Parameters:
decoder
- The decoder to use for deserialization.buffer
- A byte buffer that contains a serialized message.
-
PutDocumentMessage
public PutDocumentMessage(com.yahoo.document.DocumentPut put) Constructs a new document put message
-
-
Method Details
-
createEmpty
Creates an empty PutDocumentMessage -
getDocumentPut
public com.yahoo.document.DocumentPut getDocumentPut()Returns the document put operation -
setDocumentPut
public void setDocumentPut(com.yahoo.document.DocumentPut put) Sets the document to put -
getTimestamp
public long getTimestamp()Returns the timestamp of the document to put -
setTimestamp
public void setTimestamp(long time) Sets the timestamp of the document to put -
createReply
Description copied from class:DocumentMessage
Creates and returns a reply to this message.- Specified by:
createReply
in classDocumentMessage
- Returns:
- The created reply.
-
getApproxSize
public int getApproxSize()- Overrides:
getApproxSize
in classDocumentMessage
-
hasSequenceId
public boolean hasSequenceId()- Overrides:
hasSequenceId
in classcom.yahoo.messagebus.Message
-
getSequenceId
public long getSequenceId()- Overrides:
getSequenceId
in classcom.yahoo.messagebus.Message
-
getType
public int getType()- Specified by:
getType
in classcom.yahoo.messagebus.Routable
-
getCondition
public com.yahoo.document.TestAndSetCondition getCondition()- Specified by:
getCondition
in classTestAndSetMessage
-
setCondition
public void setCondition(com.yahoo.document.TestAndSetCondition condition) - Specified by:
setCondition
in classTestAndSetMessage
-