Class TinkerStorageMutation<T extends Element>

java.lang.Object
org.apache.tinkerpop.gremlin.tinkergraph.structure.storage.TinkerStorageMutation<T>
Type Parameters:
T - the element type (TinkerVertex or TinkerEdge)

public final class TinkerStorageMutation<T extends Element> extends Object
A single element change within a committing transaction, handed to a TinkerStorage engine to persist. This is the stable, public view of a change that decouples storage engines from TinkerGraph's internal transactional containers. A mutation is either a put (the element was added or modified, element() is non-null) or a delete (element() is null and isDeleted() is true).
  • Constructor Details

    • TinkerStorageMutation

      public TinkerStorageMutation(Object id, T element)
      Create a mutation for the given element id.
      Parameters:
      id - the element identifier (never null)
      element - the committed element for a put, or null for a delete
  • Method Details

    • id

      public Object id()
      The identifier of the changed element.
    • element

      public T element()
      The committed element to persist, or null when this mutation is a deletion.
    • isDeleted

      public boolean isDeleted()
      Returns true when this mutation deletes the element rather than adding or modifying it.