Class PutDocumentMessage


  • public class PutDocumentMessage
    extends TestAndSetMessage
    Author:
    Simon Thoresen Hult
    • Constructor Summary

      Constructors 
      Constructor Description
      PutDocumentMessage​(com.yahoo.document.DocumentPut put)
      Constructs a new document put message
      PutDocumentMessage​(LazyDecoder decoder, com.yahoo.document.serialization.DocumentDeserializer buffer)
      Constructs a new message from a byte buffer.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static PutDocumentMessage createEmpty()
      Creates an empty PutDocumentMessage
      DocumentReply createReply()
      Creates and returns a reply to this message.
      int getApproxSize()  
      com.yahoo.document.TestAndSetCondition getCondition()  
      com.yahoo.document.DocumentPut getDocumentPut()
      Returns the document put operation
      long getSequenceId()  
      long getTimestamp()
      Returns the timestamp of the document to put
      int getType()  
      boolean hasSequenceId()  
      void setCondition​(com.yahoo.document.TestAndSetCondition condition)  
      void setDocumentPut​(com.yahoo.document.DocumentPut put)
      Sets the document to put
      void setTimestamp​(long time)
      Sets the timestamp of the document to put
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • createEmpty

        public static PutDocumentMessage 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
      • hasSequenceId

        public boolean hasSequenceId()
        Overrides:
        hasSequenceId in class com.yahoo.messagebus.Message
      • getSequenceId

        public long getSequenceId()
        Overrides:
        getSequenceId in class com.yahoo.messagebus.Message
      • getType

        public int getType()
        Specified by:
        getType in class com.yahoo.messagebus.Routable
      • setCondition

        public void setCondition​(com.yahoo.document.TestAndSetCondition condition)
        Specified by:
        setCondition in class TestAndSetMessage