java.lang.Object
org.elasticsearch.index.translog.Translog.Operation
org.elasticsearch.index.translog.Translog.Index
- All Implemented Interfaces:
Writeable
- Enclosing class:
Translog
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.translog.Translog.Operation
Translog.Operation.TypeNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class org.elasticsearch.index.translog.Translog.Operation
primaryTerm, seqNo -
Constructor Summary
ConstructorsConstructorDescriptionIndex(String id, long seqNo, long primaryTerm, long version, BytesReference source, String routing, long autoGeneratedIdTimestamp) Index(org.apache.lucene.util.BytesRef uid, long seqNo, long primaryTerm, long version, BytesReference source, String routing, long autoGeneratedIdTimestamp) Index(Engine.Index index, Engine.IndexResult indexResult) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic booleanequalsWithoutAutoGeneratedTimestamp(Translog.Index o1, Translog.Index o2, boolean checkSourceBytes) longlonginthashCode()opType()routing()source()toString()org.apache.lucene.util.BytesRefuid()longversion()voidwriteBody(StreamOutput out) Writes the entire operation body which comes after the byte indicating the operation type.protected voidwriteHeader(int format, StreamOutput out) Writes the operation header.Methods inherited from class org.elasticsearch.index.translog.Translog.Operation
primaryTerm, readOperation, seqNo, writeTo
-
Field Details
-
FORMAT_NO_PARENT
public static final int FORMAT_NO_PARENT- See Also:
-
FORMAT_NO_VERSION_TYPE
public static final int FORMAT_NO_VERSION_TYPE- See Also:
-
FORMAT_NO_DOC_TYPE
public static final int FORMAT_NO_DOC_TYPE- See Also:
-
FORMAT_REORDERED
public static final int FORMAT_REORDERED- See Also:
-
SERIALIZATION_FORMAT
public static final int SERIALIZATION_FORMAT- See Also:
-
-
Constructor Details
-
Index
-
Index
public Index(String id, long seqNo, long primaryTerm, long version, BytesReference source, String routing, long autoGeneratedIdTimestamp) -
Index
public Index(org.apache.lucene.util.BytesRef uid, long seqNo, long primaryTerm, long version, BytesReference source, String routing, long autoGeneratedIdTimestamp)
-
-
Method Details
-
opType
- Specified by:
opTypein classTranslog.Operation
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein classTranslog.Operation
-
uid
public org.apache.lucene.util.BytesRef uid() -
routing
-
source
-
version
public long version() -
writeHeader
Description copied from class:Translog.OperationWrites the operation header. This is the body excluding the index source. This method only differs from writeBody for the Index operation. This is because deletes and no-ops do not have a source.- Specified by:
writeHeaderin classTranslog.Operation- Throws:
IOException
-
writeBody
Description copied from class:Translog.OperationWrites the entire operation body which comes after the byte indicating the operation type.- Specified by:
writeBodyin classTranslog.Operation- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
getAutoGeneratedIdTimestamp
public long getAutoGeneratedIdTimestamp() -
equalsWithoutAutoGeneratedTimestamp
public static boolean equalsWithoutAutoGeneratedTimestamp(Translog.Index o1, Translog.Index o2, boolean checkSourceBytes)
-