Class RemoveDocumentMessage
- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorsConstructorDescriptionRemoveDocumentMessage(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 TypeMethodDescriptionCreates and returns a reply to this message.intcom.yahoo.document.TestAndSetConditioncom.yahoo.document.DocumentIdReturns the identifier of the document to remove.com.yahoo.document.DocumentRemovelongWhen 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).longintgetType()booleanvoidsetCondition(com.yahoo.document.TestAndSetCondition condition) voidsetDocumentId(com.yahoo.document.DocumentId documentId) Sets the identifier of the document to remove.voidsetPersistedTimestamp(long time) Set the timestamp of the last known tombstone for this document.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, getTimeReceived, getTimeRemaining, getTimeRemainingNow, hasBucketSequence, isExpired, setRetry, setRetryEnabled, setRoute, setTimeReceived, setTimeReceivedNow, setTimeRemainingMethods inherited from class com.yahoo.messagebus.Routable
discard, getCallStack, getContext, getTrace, popHandler, pushHandler, setContext
-
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
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
-
hasSequenceId
public boolean hasSequenceId()- Overrides:
hasSequenceIdin classcom.yahoo.messagebus.Message
-
getSequenceId
public long getSequenceId()- Overrides:
getSequenceIdin classcom.yahoo.messagebus.Message
-
getType
public int getType()- Specified by:
getTypein classcom.yahoo.messagebus.Routable
-
setCondition
public void setCondition(com.yahoo.document.TestAndSetCondition condition) - Specified by:
setConditionin classTestAndSetMessage
-
getCondition
public com.yahoo.document.TestAndSetCondition getCondition()- Specified by:
getConditionin classTestAndSetMessage
-
getDocumentRemove
public com.yahoo.document.DocumentRemove getDocumentRemove()
-