SparkseeNet
6.0.2
|
Public Member Functions | |
boolean | IsClosed () |
Gets if Session instance has been closed or not. | |
long | PreCommit () |
PreCommits a transaction. | |
void | Close () |
Closes the Session instance. | |
void | Rollback () |
Rollbacks a transaction. | |
void | BeginUpdate () |
Begins an update transaction. | |
long | GetInMemoryPoolCapacity () |
Gets the capacity of the in-memory pool. | |
void | Commit () |
Commits a transaction. | |
com.sparsity.sparksee.gdb.Graph | GetGraph () |
Gets the Graph instance. | |
com.sparsity.sparksee.gdb.Query | NewQuery (com.sparsity.sparksee.gdb.QueryLanguage lang) |
Creates a new Query. | |
void | Begin () |
Begins a transaction. | |
com.sparsity.sparksee.gdb.Objects | NewObjects () |
Creates a new Objects instance. | |
Session class.
A Session is a stateful period of activity of a user with the Database.
All the manipulation of a Database must be enclosed into a Session. A Session can be initiated from a Database instance and allows for getting a Graph instance which represents the persistent graph (the graph database).
Also, temporary data is associated to the Session, thus when a Session is closed, all the temporary data associated to the Session is removed too. Objects or Values instances or even session attributes are an example of temporary data.
Moreover, a Session is exclusive for a thread, thus if it is shared among threads results may be fatal or unexpected.
Check out the 'Processing' and 'Transactions' sections in the SPARKSEE User Manual for details about how Sessions work and the use of transactions.
void com.sparsity.sparksee.gdb.Session.Close | ( | ) |
Closes the Session instance.
It must be called to ensure the integrity of all data.
com.sparsity.sparksee.gdb.Graph com.sparsity.sparksee.gdb.Session.GetGraph | ( | ) |
long com.sparsity.sparksee.gdb.Session.GetInMemoryPoolCapacity | ( | ) |
Gets the capacity of the in-memory pool.
boolean com.sparsity.sparksee.gdb.Session.IsClosed | ( | ) |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Session.NewObjects | ( | ) |
com.sparsity.sparksee.gdb.Query com.sparsity.sparksee.gdb.Session.NewQuery | ( | com.sparsity.sparksee.gdb.QueryLanguage | lang | ) |
Creates a new Query.
lang | The query language to create the query for |
long com.sparsity.sparksee.gdb.Session.PreCommit | ( | ) |
PreCommits a transaction.
YOU SHOULD NOT USE THIS METHOD. This method exists for a specific service and it is used to force that the transaction is written in the recovery log even though it had not been committed yet (and may never be).