SparkseeNet 6.1.0
com.sparsity.sparksee.gdb.Database Class Reference

Database class. More...

Public Member Functions

void DumpSchema (System.String filePath)
 Dump the database schema to the given file using the Sparksee scripting format.
 
void AddQueryStreamManager (com.sparsity.sparksee.gdb.QueryStreamManager queryStreamManager)
 Add a QueryStreamManager to the database.
 
boolean IsClosed ()
 Gets if Database instance has been closed or not.
 
com.sparsity.sparksee.gdb.Session NewSession ()
 Creates a new Session.
 
System.String GetPath ()
 Gets the path of the Database.
 
void EnableRollback ()
 Enables the rollback mechanism.
 
void FixCurrentCacheMaxSize ()
 Sets the cache maximum size to the current cache size in use.
 
void RedoPrecommitted (long txId)
 Redo a pending precommitted transaction recovered.
 
void GetStatistics (com.sparsity.sparksee.gdb.DatabaseStatistics stats)
 Gets Database statistics.
 
void SetCacheMaxSize (int megaBytes)
 Sets the cache maximum size (in MB).
 
void Close ()
 Closes the Database instance.
 
void DisableRollback ()
 Disables the rollback mechanism.
 
System.String GetAlias ()
 Gets the alias of the Database.
 
int GetCacheMaxSize ()
 Gets the cache maximum size (in MB).
 

Detailed Description

Database class.

All the data of the Database is stored into a persistent file which just can be created or open through a Sparksee instance.

Also, all the manipulation of a Database must be done by means of a Session which can be initiated from a Database instance.

Multiple Databases do not share the memory, that is there is no negotiation among them. In those cases, memory must be prefixed for each Database. To do that, use the SPARKSEEConfig.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

◆ AddQueryStreamManager()

void com.sparsity.sparksee.gdb.Database.AddQueryStreamManager ( com.sparsity.sparksee.gdb.QueryStreamManager queryStreamManager)

Add a QueryStreamManager to the database.

The user is responsible of keeping the manager alive for the duration of the Database. The Managers will be used in reverse order of addition while searching for a matching Stream.

Parameters
queryStreamManager[In] A reference to a QueryStreamManager

◆ Close()

void com.sparsity.sparksee.gdb.Database.Close ( )

Closes the Database instance.

It must be called to ensure the integrity of all data.

◆ DumpSchema()

void com.sparsity.sparksee.gdb.Database.DumpSchema ( System.String filePath)

Dump the database schema to the given file using the Sparksee scripting format.

Parameters
filePathnull

◆ GetAlias()

System.String com.sparsity.sparksee.gdb.Database.GetAlias ( )

Gets the alias of the Database.

Returns
The alias of the Database.

◆ GetCacheMaxSize()

int com.sparsity.sparksee.gdb.Database.GetCacheMaxSize ( )

Gets the cache maximum size (in MB).

Returns
Returns the current cache max size.

◆ GetPath()

System.String com.sparsity.sparksee.gdb.Database.GetPath ( )

Gets the path of the Database.

Returns
The path of the Database.

◆ GetStatistics()

void com.sparsity.sparksee.gdb.Database.GetStatistics ( com.sparsity.sparksee.gdb.DatabaseStatistics stats)

Gets Database statistics.

Parameters
stats[out] The DatabaseStatistics instance.

◆ IsClosed()

boolean com.sparsity.sparksee.gdb.Database.IsClosed ( )

Gets if Database instance has been closed or not.

See also
Close()
Returns
TRUE if the Database instance has been closed, FALSE otherwise.

◆ NewSession()

com.sparsity.sparksee.gdb.Session com.sparsity.sparksee.gdb.Database.NewSession ( )

Creates a new Session.

Returns
A new Session instance.

◆ RedoPrecommitted()

void com.sparsity.sparksee.gdb.Database.RedoPrecommitted ( long txId)

Redo a pending precommitted transaction recovered.

YOU SHOULD NOT USE THIS METHOD. This method only exists for a specific service.

Parameters
txIdnull

◆ SetCacheMaxSize()

void com.sparsity.sparksee.gdb.Database.SetCacheMaxSize ( int megaBytes)

Sets the cache maximum size (in MB).

0 means unlimited which is all the physical memory of the computer minus a small margin.

Parameters
megaBytes[in] The new cache max size.