com.thinkaurelius.titan.graphdb.database

## Class StandardTitanGraph

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.blueprints.TitanBlueprintsGraph
  - - com.thinkaurelius.titan.graphdb.database.StandardTitanGraph

- All Implemented Interfaces:
    TitanGraph, com.tinkerpop.blueprints.Graph, com.tinkerpop.blueprints.KeyIndexableGraph, com.tinkerpop.blueprints.ThreadedTransactionalGraph, com.tinkerpop.blueprints.TransactionalGraph

      public class StandardTitanGraph
      extends TitanBlueprintsGraph

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.tinkerpop.blueprints.TransactionalGraph

      `com.tinkerpop.blueprints.TransactionalGraph.Conclusion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected EdgeSerializer` | `edgeSerializer`
    `protected IndexSerializer` | `indexSerializer`
    `protected Serializer` | `serializer`
    `SliceQuery` | `vertexExistenceQuery`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardTitanGraph(GraphDatabaseConfiguration configuration)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `acquireLock(CompositeIndexType index, boolean acquireLocksConfig)`
    `static boolean` | `acquireLock(InternalRelation relation, int pos, boolean acquireLocksConfig)`
    `void` | `assignID(InternalRelation relation)`
    `void` | `assignID(InternalVertex vertex, VertexLabel label)`
    `StandardTransactionBuilder` | `buildTransaction()` Returns a `TransactionBuilder` to construct a new thread-independent `TitanTransaction`.
    `void` | `closeTransaction(StandardTitanTx tx)`
    `void` | `commit(Collection<InternalRelation> addedRelations, Collection<InternalRelation> deletedRelations, StandardTitanTx tx)`
    `List<EntryList>` | `edgeMultiQuery(com.carrotsearch.hppc.LongArrayList vids, SliceQuery query, BackendTransaction tx)`
    `EntryList` | `edgeQuery(long vid, SliceQuery query, BackendTransaction tx)`
    `Backend` | `getBackend()`
    `GraphDatabaseConfiguration` | `getConfiguration()`
    `Serializer` | `getDataSerializer()`
    `EdgeSerializer` | `getEdgeSerializer()`
    `com.tinkerpop.blueprints.Features` | `getFeatures()`
    `IDInspector` | `getIDInspector()`
    `IDManager` | `getIDManager()`
    `IndexSerializer` | `getIndexSerializer()`
    `TitanManagement` | `getManagementSystem()` Returns the management system for this graph instance.
    `Set<? extends TitanTransaction>` | `getOpenTransactions()`
    `SchemaCache` | `getSchemaCache()`
    `static int` | `getTTL(InternalRelation rel)` The TTL of a relation (edge or property) is the minimum of: 1) The TTL configured of the relation type (if exists) 2) The TTL configured for the label any of the relation end point vertices (if exists)
    `static int` | `getTTL(InternalVertex v)`
    `RecordIterator<Long>` | `getVertexIDs(BackendTransaction tx)`
    `boolean` | `isOpen()` Checks whether the graph is still open.
    `TitanTransaction` | `newThreadBoundTransaction()`
    `TitanTransaction` | `newTransaction()` Opens a new thread-independent `TitanTransaction`.
    `StandardTitanTx` | `newTransaction(TransactionConfiguration configuration)`
    `com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.ModificationSummary` | `prepareCommit(Collection<InternalRelation> addedRelations, Collection<InternalRelation> deletedRelations, com.google.common.base.Predicate<InternalRelation> filter, BackendTransaction mutator, StandardTitanTx tx, boolean acquireLocks)`
    `void` | `shutdown()` Closes the graph database.

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.blueprints.TitanBlueprintsGraph

      `addEdge, addVertex, addVertexWithLabel, addVertexWithLabel, commit, containsRelationType, containsVertexLabel, createKeyIndex, dropKeyIndex, getCurrentThreadTx, getEdge, getEdges, getEdges, getIndexedKeys, getRelationType, getVertex, getVertexLabel, getVertices, getVertices, indexQuery, multiQuery, multiQuery, query, removeEdge, removeVertex, rollback, stopTransaction, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### indexSerializer

          protected final IndexSerializer indexSerializer

    - #### edgeSerializer

          protected final EdgeSerializer edgeSerializer

    - #### serializer

          protected final Serializer serializer

    - #### vertexExistenceQuery

          public final SliceQuery vertexExistenceQuery

  - ### Constructor Detail

    - #### StandardTitanGraph

          public StandardTitanGraph(GraphDatabaseConfiguration configuration)

  - ### Method Detail

    - #### isOpen

          public boolean isOpen()

      Description copied from interface: `TitanGraph`
      Checks whether the graph is still open.
      Returns:
        true, if the graph is open, else false.
      See Also:
        `TitanGraph.shutdown()`

    - #### shutdown

          public void shutdown()
                        throws TitanException

      Description copied from interface: `TitanGraph`
      Closes the graph database.

      Closing the graph database causes a disconnect and possible closing of the underlying storage backend and a release of all occupied resources by this graph database. Closing a graph database requires that all open thread-independent transactions have been closed - otherwise they will be left abandoned.
      Specified by:
        `shutdown` in interface `TitanGraph`
      Specified by:
        `shutdown` in interface `com.tinkerpop.blueprints.Graph`
      Specified by:
        `shutdown` in interface `com.tinkerpop.blueprints.TransactionalGraph`
      Overrides:
        `shutdown` in class `TitanBlueprintsGraph`
      Throws:
        `TitanException` - if closing the graph database caused errors in the storage backend

    - #### getFeatures

          public com.tinkerpop.blueprints.Features getFeatures()

    - #### getIndexSerializer

          public IndexSerializer getIndexSerializer()

    - #### getBackend

          public Backend getBackend()

    - #### getIDInspector

          public IDInspector getIDInspector()

    - #### getIDManager

          public IDManager getIDManager()

    - #### getEdgeSerializer

          public EdgeSerializer getEdgeSerializer()

    - #### getDataSerializer

          public Serializer getDataSerializer()

    - #### getSchemaCache

          public SchemaCache getSchemaCache()

    - #### getConfiguration

          public GraphDatabaseConfiguration getConfiguration()

    - #### getManagementSystem

          public TitanManagement getManagementSystem()

      Description copied from interface: `TitanGraph`
      Returns the management system for this graph instance. The management system provides functionality to change global configuration options, install indexes and inspect the graph schema.

      The management system operates in its own transactional context which must be explicitly closed.
      Returns:

    - #### getOpenTransactions

          public Set<? extends TitanTransaction> getOpenTransactions()

    - #### newTransaction

          public TitanTransaction newTransaction()

      Description copied from interface: `TitanGraph`
      Opens a new thread-independent `TitanTransaction`.

      The transaction is open when it is returned but MUST be explicitly closed by calling `TitanTransaction.commit()` or `TitanTransaction.rollback()` when it is no longer needed.

      Note, that this returns a thread independent transaction object. It is not necessary to call this method to use Blueprint's standard transaction framework which will automatically start a transaction with the first operation on the graph.
      Returns:
        Transaction object representing a transactional context.

    - #### buildTransaction

          public StandardTransactionBuilder buildTransaction()

      Description copied from interface: `TitanGraph`
      Returns a `TransactionBuilder` to construct a new thread-independent `TitanTransaction`.
      Returns:
        a new TransactionBuilder
      See Also:
        `TransactionBuilder`, `TitanGraph.newTransaction()`

    - #### newThreadBoundTransaction

          public TitanTransaction newThreadBoundTransaction()

      Specified by:
        `newThreadBoundTransaction` in class `TitanBlueprintsGraph`

    - #### newTransaction

          public StandardTitanTx newTransaction(TransactionConfiguration configuration)

    - #### closeTransaction

          public void closeTransaction(StandardTitanTx tx)

    - #### getVertexIDs

          public RecordIterator<Long> getVertexIDs(BackendTransaction tx)

    - #### edgeQuery

          public EntryList edgeQuery(long vid,
                            SliceQuery query,
                            BackendTransaction tx)

    - #### edgeMultiQuery

          public List<EntryList> edgeMultiQuery(com.carrotsearch.hppc.LongArrayList vids,
                                       SliceQuery query,
                                       BackendTransaction tx)

    - #### assignID

          public void assignID(InternalRelation relation)

    - #### assignID

          public void assignID(InternalVertex vertex,
                      VertexLabel label)

    - #### acquireLock

          public static boolean acquireLock(InternalRelation relation,
                            int pos,
                            boolean acquireLocksConfig)

    - #### acquireLock

          public static boolean acquireLock(CompositeIndexType index,
                            boolean acquireLocksConfig)

    - #### getTTL

          public static int getTTL(InternalRelation rel)

      The TTL of a relation (edge or property) is the minimum of: 1) The TTL configured of the relation type (if exists) 2) The TTL configured for the label any of the relation end point vertices (if exists)
      Parameters:
        `rel` - relation to determine the TTL for
      Returns:

    - #### getTTL

          public static int getTTL(InternalVertex v)

    - #### prepareCommit

          public com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.ModificationSummary prepareCommit(Collection<InternalRelation> addedRelations,
                                                                                                      Collection<InternalRelation> deletedRelations,
                                                                                                      com.google.common.base.Predicate<InternalRelation> filter,
                                                                                                      BackendTransaction mutator,
                                                                                                      StandardTitanTx tx,
                                                                                                      boolean acquireLocks)
                                                                                                        throws BackendException

      Throws:
        `BackendException`

    - #### commit

          public void commit(Collection<InternalRelation> addedRelations,
                    Collection<InternalRelation> deletedRelations,
                    StandardTitanTx tx)

Copyright © 2012–2014. All rights reserved.