java.lang.Object
org.elasticsearch.index.translog.TranslogHeaderWriter
This class provided specialized serialization methods for translog operations. The goal is to allow direct
access to the current recycler bytes stream output page and write the entire operation with a single bounds
check.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteDeleteHeader(RecyclerBytesStreamOutput buffer, Translog.Delete delete) static voidwriteIndexHeader(RecyclerBytesStreamOutput buffer, Translog.Index index) static voidwriteNoOpHeader(RecyclerBytesStreamOutput buffer, Translog.NoOp noop)
-
Field Details
-
FIXED_INDEX_HEADER_SIZE
public static final int FIXED_INDEX_HEADER_SIZE- See Also:
-
FIXED_DELETE_HEADER_SIZE
public static final int FIXED_DELETE_HEADER_SIZE- See Also:
-
FIXED_NO_OP_HEADER_SIZE
public static final int FIXED_NO_OP_HEADER_SIZE- See Also:
-
OPERATION_TYPE_OFFSET
public static final int OPERATION_TYPE_OFFSET- See Also:
-
SERIALIZATION_FORMAT_OFFSET
public static final int SERIALIZATION_FORMAT_OFFSET- See Also:
-
VERSION_OFFSET
public static final int VERSION_OFFSET- See Also:
-
SEQ_NO_OFFSET
public static final int SEQ_NO_OFFSET- See Also:
-
PRIMARY_TERM_OFFSET
public static final int PRIMARY_TERM_OFFSET- See Also:
-
INDEX_AUTO_GENERATED_ID_TIMESTAMP_OFFSET
public static final int INDEX_AUTO_GENERATED_ID_TIMESTAMP_OFFSET- See Also:
-
INDEX_UID_LENGTH_OFFSET
public static final int INDEX_UID_LENGTH_OFFSET- See Also:
-
-
Method Details
-
writeIndexHeader
public static void writeIndexHeader(RecyclerBytesStreamOutput buffer, Translog.Index index) throws IOException - Throws:
IOException
-
writeDeleteHeader
public static void writeDeleteHeader(RecyclerBytesStreamOutput buffer, Translog.Delete delete) throws IOException - Throws:
IOException
-
writeNoOpHeader
public static void writeNoOpHeader(RecyclerBytesStreamOutput buffer, Translog.NoOp noop) throws IOException - Throws:
IOException
-