Package org.elasticsearch.index.translog
Interface Translog.Operation
- All Known Implementing Classes:
Translog.Delete,Translog.Index,Translog.NoOp
- Enclosing class:
- Translog
public static interface Translog.Operation
A generic interface representing an operation performed on the transaction log.
Each is associated with a type.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTranslog.Operation.Type -
Method Summary
Modifier and Type Method Description longestimateSize()Translog.SourcegetSource()Translog.Operation.TypeopType()longprimaryTerm()static Translog.OperationreadOperation(StreamInput input)Reads the type and the operation from the given stream.longseqNo()static voidwriteOperation(StreamOutput output, Translog.Operation operation)Writes the type and translog operation to the given stream
-
Method Details
-
opType
Translog.Operation.Type opType() -
estimateSize
long estimateSize() -
getSource
Translog.Source getSource() -
seqNo
long seqNo() -
primaryTerm
long primaryTerm() -
readOperation
Reads the type and the operation from the given stream. The operation must be written withwriteOperation(StreamOutput, Operation)- Throws:
java.io.IOException
-
writeOperation
static void writeOperation(StreamOutput output, Translog.Operation operation) throws java.io.IOExceptionWrites the type and translog operation to the given stream- Throws:
java.io.IOException
-