public final class SessionManager
extends java.lang.Object
Session
object. A table of one to one sessions and
tables is maintained.Modifier and Type | Method and Description |
---|---|
static Session |
Connect(java.lang.String dbname,
org.rocksdb.Options options)
Open the database and extract the ColumnFamily that represents the default column family for main class
|
static Session |
Connect(java.lang.String dbname,
org.rocksdb.Options options,
java.lang.String derivedClassName)
Open the database and extract the ColumnFamily that represents the derivedClassName
|
static Session |
ConnectNoRecovery(java.lang.String dbname,
org.rocksdb.Options options)
Start the DB with no logging for debugging purposes
or to run read only without logging for some reason
|
static TransactionSession |
ConnectTransaction(Alias alias,
java.lang.String dbname,
org.rocksdb.Options options)
Connect to a transaction database column family for a default ColumnFamily class being stored in that database.
|
static TransactionSession |
ConnectTransaction(Alias alias,
java.lang.String dbname,
org.rocksdb.Options options,
java.lang.String derivedClassName)
Connect to a transaction database column family for a derived class being stored in that database.
|
static TransactionSession |
ConnectTransaction(java.lang.String dbname,
org.rocksdb.Options options)
Connect to a transaction database column family for a default ColumnFamily class being stored in that database.
|
static TransactionSession |
ConnectTransaction(java.lang.String dbname,
org.rocksdb.Options options,
java.lang.String derivedClassName)
Connect to a transaction database column family for a derived class being stored in that database.
|
static SessionManager |
getInstance() |
static java.util.concurrent.ConcurrentHashMap<java.lang.String,Session> |
getSessionTable() |
static boolean |
isDBOffline(java.lang.String dbname) |
public static SessionManager getInstance()
public static Session Connect(java.lang.String dbname, org.rocksdb.Options options, java.lang.String derivedClassName) throws java.io.IOException, java.lang.IllegalAccessException
dbname
- options
- derivedClassName
- Session
that contains the methods to be invoked with ColumnFamilyHandle once we extract it from DB paramsjava.io.IOException
java.lang.IllegalAccessException
public static Session Connect(java.lang.String dbname, org.rocksdb.Options options) throws java.io.IOException, java.lang.IllegalAccessException
dbname
- options
- Session
that contains the methods to be invoked with ColumnFamilyHandle once we extract it from DB paramsjava.io.IOException
java.lang.IllegalAccessException
public static TransactionSession ConnectTransaction(java.lang.String dbname, org.rocksdb.Options options) throws java.io.IOException, java.lang.IllegalAccessException
dbname
- the path to the databaseoptions
- the RocksDb optionsTransactionSession
that contains methods we call using ColumnFamilyHandlejava.io.IOException
java.lang.IllegalAccessException
public static TransactionSession ConnectTransaction(Alias alias, java.lang.String dbname, org.rocksdb.Options options) throws java.io.IOException, java.lang.IllegalAccessException
dbname
- the path to the databaseoptions
- the RocksDb optionsTransactionSession
that contains methods we call using ColumnFamilyHandlejava.io.IOException
java.lang.IllegalAccessException
public static TransactionSession ConnectTransaction(Alias alias, java.lang.String dbname, org.rocksdb.Options options, java.lang.String derivedClassName) throws java.io.IOException, java.lang.IllegalAccessException
dbname
- the path to the databaseoptions
- the RocksDb optionsderivedClassName
- the derived class that will contain the ColumnFamily of the same nameTransactionSession
that contains methods we call using ColumnFamilyHandlejava.io.IOException
java.lang.IllegalAccessException
public static TransactionSession ConnectTransaction(java.lang.String dbname, org.rocksdb.Options options, java.lang.String derivedClassName) throws java.io.IOException, java.lang.IllegalAccessException
dbname
- the path to the databaseoptions
- the RocksDb optionsderivedClassName
- the derived class that will contain the ColumnFamily of the same nameTransactionSession
that contains methods we call using ColumnFamilyHandlejava.io.IOException
java.lang.IllegalAccessException
public static Session ConnectNoRecovery(java.lang.String dbname, org.rocksdb.Options options) throws java.io.IOException, java.lang.IllegalAccessException
dbname
- the path to the database (path+dbname)remoteDBName
- The remote path to database tablespace directories (tablespace prepended to endof path) or nulljava.io.IOException
java.lang.IllegalAccessException
public static boolean isDBOffline(java.lang.String dbname)
public static java.util.concurrent.ConcurrentHashMap<java.lang.String,Session> getSessionTable()