java.lang.Object
org.apache.tinkerpop.gremlin.tinkergraph.structure.storage.AbstractLogStorage
org.apache.tinkerpop.gremlin.tinkergraph.structure.storage.GraphBinaryStorage
All Implemented Interfaces:
AutoCloseable, TinkerStorage

public final class GraphBinaryStorage extends AbstractLogStorage
The GraphBinary TinkerStorage codec on top of AbstractLogStorage. The base owns the durable log-structured machinery (file layout, VERSION marker, CRC framing, replay fold, SyncMode durability, crash-safe and threshold compaction); this class supplies only how an element is encoded and decoded.

Rather than serialize a whole DetachedVertex/DetachedEdge (which repeats every property key and label as a full string on every element and wraps each property in a VertexProperty envelope), this codec writes element components directly: element ids and property values go through GraphBinary's scalar serializers (a one-byte DataType tag plus the raw value), while labels, property keys, and meta-property keys are dictionary-encoded to small integer refs. The dictionary is a single dense namespace built by first appearance; new entries are emitted as OP_DICT_APPEND records inside the same frame, before the entries that reference them, so a torn trailing frame drops a ref and its user atomically.

Vertex-property ids are auto-generated and, by default, not persisted (they are regenerated on load); element and edge ids are always preserved. The snapshot streams one element per frame, so compaction never holds a second full copy of the graph in heap.