Package org.elasticsearch.index.engine
Class Engine.Result
java.lang.Object
org.elasticsearch.index.engine.Engine.Result
- Direct Known Subclasses:
Engine.DeleteResult
,Engine.IndexResult
,Engine.NoOpResult
- Enclosing class:
- Engine
Base class for index and delete operation results
Holds result meta data (e.g. translog location, updated version)
for an executed write
Engine.Operation
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Result(Engine.Operation.TYPE operationType, long version, long term, long seqNo)
protected
Result(Engine.Operation.TYPE operationType, Exception failure, long version, long term, long seqNo)
protected
Result(Engine.Operation.TYPE operationType, Mapping requiredMappingUpdate)
-
Method Summary
Modifier and TypeMethodDescriptionget document failure while executing the operationnull
in case of no failureIf the operation was aborted due to missing mappings, this method will return the mappings that are required to complete the operation.whether the operation was successful, has failed or was aborted due to a mapping updatelong
getSeqNo()
Get the sequence number on the primary.long
getTerm()
long
getTook()
get total time in nanosecondsget the translog location after executing the operationlong
get the updated document version
-
Constructor Details
-
Result
protected Result(Engine.Operation.TYPE operationType, Exception failure, long version, long term, long seqNo) -
Result
-
Result
-
-
Method Details
-
getResultType
whether the operation was successful, has failed or was aborted due to a mapping update -
getVersion
public long getVersion()get the updated document version -
getSeqNo
public long getSeqNo()Get the sequence number on the primary.- Returns:
- the sequence number
-
getTerm
public long getTerm() -
getRequiredMappingUpdate
If the operation was aborted due to missing mappings, this method will return the mappings that are required to complete the operation. -
getTranslogLocation
get the translog location after executing the operation -
getFailure
get document failure while executing the operationnull
in case of no failure -
getTook
public long getTook()get total time in nanoseconds -
getOperationType
-