Class TinkerStorageGraph

java.lang.Object
org.apache.tinkerpop.gremlin.tinkergraph.structure.AbstractTinkerGraph
org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerStorageGraph
All Implemented Interfaces:
AutoCloseable, Graph, Host, TinkerGraph

public final class TinkerStorageGraph extends AbstractTinkerGraph
The transactional implementation of the TinkerGraph interface. It provides read committed transaction isolation with optimistic locking and, when a storage engine is configured, durable persistence to disk. With no storage engine configured it is an in-memory transactional graph that retains nothing across restarts.

Persistence is pluggable through the TinkerStorage SPI and enabled with the gremlin.tinkergraph.storage and gremlin.tinkergraph.storage.directory configuration keys. Each committed transaction is written through to the storage engine before the in-memory commit is applied, and reopening the same location replays the persisted commits to rebuild the graph. A storage location is single-writer: it is guarded by an exclusive DirectoryLock so a second open of the same directory fails rather than corrupting the data.

Author:
Valentyn Kahamlyk