public class GraknSessionImpl extends Object implements GraknSession
Builds a Grakn Graph factory
This class facilitates the construction of Grakn Graphs by determining which factory should be built.
It does this by either defaulting to an in memory graph GraknTinkerGraph or by
retrieving the factory definition from engine.
The deployer of engine decides on the backend and this class will handle producing the correct graphs.
DEFAULT_URI| Constructor and Description |
|---|
GraknSessionImpl(String keyspace,
String location) |
| 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.
|
public GraknGraph open(GraknTxType transactionType)
GraknSessionopen in interface GraknSessiontransactionType - The type of transaction to open see GraknTxType for more detailsGraknGraphpublic GraknComputer getGraphComputer()
GraknSessiongetGraphComputer in interface GraknSessionGraknComputerpublic void close()
throws GraphOperationException
GraknSessionclose in interface GraknSessionclose in interface AutoCloseableGraphOperationException - when more than 1 transaction is open on the graphCopyright © 2017 Grakn Labs Ltd. All rights reserved.