public class StandardJanusGraph extends JanusGraphBlueprintsGraph
org.apache.tinkerpop.gremlin.structure.Graph.Exceptions, org.apache.tinkerpop.gremlin.structure.Graph.Features, org.apache.tinkerpop.gremlin.structure.Graph.Hidden, org.apache.tinkerpop.gremlin.structure.Graph.OptIn, org.apache.tinkerpop.gremlin.structure.Graph.OptIns, org.apache.tinkerpop.gremlin.structure.Graph.OptOut, org.apache.tinkerpop.gremlin.structure.Graph.OptOuts, org.apache.tinkerpop.gremlin.structure.Graph.Variables| Modifier and Type | Field and Description |
|---|---|
protected EdgeSerializer |
edgeSerializer |
protected IndexSerializer |
indexSerializer |
protected Serializer |
serializer |
SliceQuery |
vertexExistenceQuery |
| Constructor and Description |
|---|
StandardJanusGraph(GraphDatabaseConfiguration configuration) |
| 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 JanusGraphTransaction. |
void |
close()
Closes the graph database.
|
void |
closeTransaction(StandardJanusGraphTx tx) |
void |
commit(Collection<InternalRelation> addedRelations,
Collection<InternalRelation> deletedRelations,
StandardJanusGraphTx tx) |
List<EntryList> |
edgeMultiQuery(com.carrotsearch.hppc.LongArrayList vertexIdsAsLongs,
SliceQuery query,
BackendTransaction tx) |
EntryList |
edgeQuery(long vid,
SliceQuery query,
BackendTransaction tx) |
org.apache.tinkerpop.gremlin.structure.Graph.Features |
features() |
Backend |
getBackend() |
GraphDatabaseConfiguration |
getConfiguration() |
Serializer |
getDataSerializer() |
EdgeSerializer |
getEdgeSerializer() |
String |
getGraphName() |
IDManager |
getIDManager() |
IndexSelectionStrategy |
getIndexSelector() |
IndexSerializer |
getIndexSerializer() |
Set<? extends JanusGraphTransaction> |
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 |
isClosed()
Checks whether the graph is closed.
|
boolean |
isOpen()
Checks whether the graph is open.
|
JanusGraphTransaction |
newThreadBoundTransaction() |
JanusGraphTransaction |
newTransaction()
Opens a new thread-independent
JanusGraphTransaction. |
StandardJanusGraphTx |
newTransaction(TransactionConfiguration configuration) |
JanusGraphManagement |
openManagement()
Returns the management system for this graph instance.
|
org.janusgraph.graphdb.database.StandardJanusGraph.ModificationSummary |
prepareCommit(Collection<InternalRelation> addedRelations,
Collection<InternalRelation> deletedRelations,
com.google.common.base.Predicate<InternalRelation> filter,
BackendTransaction mutator,
StandardJanusGraphTx tx,
boolean acquireLocks) |
addConnection, addProperties, addProperties, addVertex, addVertex, compute, compute, configuration, containsEdgeLabel, containsPropertyKey, containsRelationType, containsVertexLabel, edges, getCurrentThreadTx, getEdgeLabel, getOrCreateEdgeLabel, getOrCreatePropertyKey, getOrCreateVertexLabel, getPropertyKey, getRelationType, getVertexLabel, indexQuery, io, makeEdgeLabel, makePropertyKey, makeVertexLabel, mixedIndexCountQuery, multiQuery, multiQuery, query, toString, tx, variables, verticesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitmain, versiontraversal, traversal, txgetOrCreatePropertyKey, getOrCreatePropertyKeyprotected final IndexSerializer indexSerializer
protected final EdgeSerializer edgeSerializer
protected final Serializer serializer
public final SliceQuery vertexExistenceQuery
public StandardJanusGraph(GraphDatabaseConfiguration configuration)
public String getGraphName()
public boolean isOpen()
JanusGraphJanusGraph.close()public boolean isClosed()
JanusGraphpublic void close()
throws JanusGraphException
JanusGraphClosing 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.
close in interface AutoCloseableclose in interface org.apache.tinkerpop.gremlin.structure.Graphclose in interface JanusGraphclose in interface Transactionclose in class JanusGraphBlueprintsGraphJanusGraphException - if closing the graph database caused errors in the storage backendpublic org.apache.tinkerpop.gremlin.structure.Graph.Features features()
public IndexSerializer getIndexSerializer()
public IndexSelectionStrategy getIndexSelector()
public Backend getBackend()
public IDManager getIDManager()
public EdgeSerializer getEdgeSerializer()
public Serializer getDataSerializer()
public SchemaCache getSchemaCache()
public GraphDatabaseConfiguration getConfiguration()
public JanusGraphManagement openManagement()
JanusGraphThe management system operates in its own transactional context which must be explicitly closed.
public Set<? extends JanusGraphTransaction> getOpenTransactions()
public JanusGraphTransaction newTransaction()
JanusGraphJanusGraphTransaction.
The transaction is open when it is returned but MUST be explicitly closed by calling JanusGraphTransaction.commit()
or JanusGraphTransaction.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.
public StandardTransactionBuilder buildTransaction()
JanusGraphTransactionBuilder to construct a new thread-independent JanusGraphTransaction.TransactionBuilder,
JanusGraph.newTransaction()public JanusGraphTransaction newThreadBoundTransaction()
newThreadBoundTransaction in class JanusGraphBlueprintsGraphpublic StandardJanusGraphTx newTransaction(TransactionConfiguration configuration)
public void closeTransaction(StandardJanusGraphTx tx)
public RecordIterator<Long> getVertexIDs(BackendTransaction tx)
public EntryList edgeQuery(long vid, SliceQuery query, BackendTransaction tx)
public List<EntryList> edgeMultiQuery(com.carrotsearch.hppc.LongArrayList vertexIdsAsLongs, SliceQuery query, BackendTransaction tx)
public void assignID(InternalRelation relation)
public void assignID(InternalVertex vertex, VertexLabel label)
public static boolean acquireLock(InternalRelation relation, int pos, boolean acquireLocksConfig)
public static boolean acquireLock(CompositeIndexType index, boolean acquireLocksConfig)
public static int getTTL(InternalRelation rel)
rel - relation to determine the TTL forpublic static int getTTL(InternalVertex v)
public org.janusgraph.graphdb.database.StandardJanusGraph.ModificationSummary prepareCommit(Collection<InternalRelation> addedRelations, Collection<InternalRelation> deletedRelations, com.google.common.base.Predicate<InternalRelation> filter, BackendTransaction mutator, StandardJanusGraphTx tx, boolean acquireLocks) throws BackendException
BackendExceptionpublic void commit(Collection<InternalRelation> addedRelations, Collection<InternalRelation> deletedRelations, StandardJanusGraphTx tx) throws BackendException
BackendExceptionCopyright © 2012–2023. All rights reserved.