Class RemoveDocumentMessage

java.lang.Object
com.yahoo.messagebus.Routable
com.yahoo.messagebus.Message

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

    Constructors
    Constructor
    Description
    RemoveDocumentMessage(com.yahoo.document.DocumentId documentId)
    Constructs a new document remove message.
    RemoveDocumentMessage(com.yahoo.document.DocumentRemove remove)
    Constructs a new document remove message.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates and returns a reply to this message.
    int
     
    com.yahoo.document.TestAndSetCondition
     
    com.yahoo.document.DocumentId
    Returns the identifier of the document to remove.
    com.yahoo.document.DocumentRemove
     
    long
    When a visitor client receives a Remove as part of the visiting operation, this timestamp represents the wall clock time in microseconds(*) of the tombstone's creation (i.e. the highest known time the original document was removed).
    long
     
    int
     
    boolean
     
    void
    setCondition(com.yahoo.document.TestAndSetCondition condition)
     
    void
    setDocumentId(com.yahoo.document.DocumentId documentId)
    Sets the identifier of the document to remove.
    void
    Set the timestamp of the last known tombstone for this document.

    Methods inherited from class com.yahoo.documentapi.messagebus.protocol.DocumentMessage

    getPriority, getProtocol, 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

    Methods inherited from class java.lang.Object

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

    • RemoveDocumentMessage

      public RemoveDocumentMessage(com.yahoo.document.DocumentId documentId)
      Constructs a new document remove message.
      Parameters:
      documentId - The identifier of the document to remove.
    • RemoveDocumentMessage

      public RemoveDocumentMessage(com.yahoo.document.DocumentRemove remove)
      Constructs a new document remove message.
      Parameters:
      remove - The DocumentRemove operation to perform
  • Method Details

    • getDocumentId

      public com.yahoo.document.DocumentId getDocumentId()
      Returns the identifier of the document to remove.
      Returns:
      The document id.
    • setDocumentId

      public void setDocumentId(com.yahoo.document.DocumentId documentId)
      Sets the identifier of the document to remove.
      Parameters:
      documentId - The document id to set.
    • setPersistedTimestamp

      public void setPersistedTimestamp(long time)

      Set the timestamp of the last known tombstone for this document.

      This is normally only invoked by the backends as part of visiting.

    • getPersistedTimestamp

      public long getPersistedTimestamp()

      When a visitor client receives a Remove as part of the visiting operation, this timestamp represents the wall clock time in microseconds(*) of the tombstone's creation (i.e. the highest known time the original document was removed).

      If zero, the sending content node is too old to support this feature.

      This value is not guaranteed to be linearizable. During e.g. network partitions this value might not represent the latest acknowledged operation for the document.

      Unsupported (and ignored) for Removes sent by the client during feeding.

      (*) (wall clock seconds since UTC epoch * 1M) + synthetic intra-second microsecond counter.

    • createReply

      public DocumentReply createReply()
      Description copied from class: DocumentMessage
      Creates and returns a reply to this message.
      Specified by:
      createReply in class DocumentMessage
      Returns:
      The created reply.
    • getApproxSize

      public int getApproxSize()
      Overrides:
      getApproxSize in class DocumentMessage
    • 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
    • getCondition

      public com.yahoo.document.TestAndSetCondition getCondition()
      Specified by:
      getCondition in class TestAndSetMessage
    • getDocumentRemove

      public com.yahoo.document.DocumentRemove getDocumentRemove()