public interface GraknSession extends AutoCloseable
Builds a Grakn Graph Session
This class facilitates the construction of Grakn Graphs by determining which session should be built.
The graphs produced by a session are singletons bound to a specific keyspace.
To create graphs bound to a different keyspace you must create another session
using Grakn.session(String, String)
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_URI |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the main connection to the graph.
|
GraknComputer |
getGraphComputer()
Get a new or existing GraknComputer.
|
GraknGraph |
open(GraknTxType transactionType)
Gets a new transaction bound to the keyspace of this Session.
|
static final String DEFAULT_URI
@CheckReturnValue GraknGraph open(GraknTxType transactionType)
transactionType - The type of transaction to open see GraknTxType for more detailsGraknGraph@CheckReturnValue GraknComputer getGraphComputer()
GraknComputervoid close()
throws GraphOperationException
close in interface AutoCloseableGraphOperationException - when more than 1 transaction is open on the graphCopyright © 2017 Grakn Labs Ltd. All rights reserved.