public final class SessionManager
extends java.lang.Object
Session subclass instance. A table of one to one sessions and
tables is maintained. Primary means by which DatabaseManager receives various TransactionSession,
OptimisticTransactionSession, etc. and from there obtains the BufferedMap, TransactionalMap, etc.
maps by which most of the work gets done. The session typically provides the overarching set of methods from which the various
maps encapsulate the functionality of the specific type of map.| 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 |
ConnectOptimisticTransaction(Alias alias,
java.lang.String dbname,
org.rocksdb.Options options)
Connect to an optimistic transaction database column family for a default ColumnFamily class being stored in that database.
|
static TransactionSession |
ConnectOptimisticTransaction(Alias alias,
java.lang.String dbname,
org.rocksdb.Options options,
java.lang.String derivedClassName)
Connect to an optimistic transaction database column family for a derived class being stored in that database.
|
static TransactionSession |
ConnectOptimisticTransaction(java.lang.String dbname,
org.rocksdb.Options options)
Connect to an optimistic transaction database column family for a default ColumnFamily class being stored in that database.
|
static TransactionSession |
ConnectOptimisticTransaction(java.lang.String dbname,
org.rocksdb.Options options,
java.lang.String derivedClassName)
Connect to an optimistic transaction database column family for a derived class being stored in that database.
|
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,
long timeout)
Connect to a transaction database column family for a default ColumnFamily class being stored in that database with associated transaction timeout.
|
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(Alias alias,
java.lang.String dbname,
org.rocksdb.Options options,
java.lang.String derivedClassName,
long timeout)
Connect to a transaction database column family for a derived class being stored in that database with associated transaction timeout.
|
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,
long timeout)
Connect to a transaction database column family for a default ColumnFamily class being stored in that database with associated transaction timeout.
|
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 TransactionSession |
ConnectTransaction(java.lang.String dbname,
org.rocksdb.Options options,
java.lang.String derivedClassName,
long timeout)
Connect to a transaction database column family for a derived class being stored in that database with associated transaction timeout.
|
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 - RocksDb.listColumnFamilies optionsderivedClassName - Session that contains the methods to be invoked with ColumnFamilyHandle once we extract it from DB paramsjava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static Session Connect(java.lang.String dbname, org.rocksdb.Options options) throws java.io.IOException, java.lang.IllegalAccessException
dbname - options - RocksDb.listColumnFamilies optionsSession that contains the methods to be invoked with ColumnFamilyHandle once we extract it from DB paramsjava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic 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 options RocksDb.listColumnFamilies optionsTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectTransaction(java.lang.String dbname, org.rocksdb.Options options, long timeout) throws java.io.IOException, java.lang.IllegalAccessException
dbname - the path to the databaseoptions - the RocksDb options RocksDb.listColumnFamilies optionstimeout - the transaction timeoutTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectTransaction(Alias alias, java.lang.String dbname, org.rocksdb.Options options) throws java.io.IOException, java.lang.IllegalAccessException
alias - the database aliasdbname - the path to the databaseoptions - the RocksDb options RocksDb.listColumnFamilies optionsTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectTransaction(Alias alias, java.lang.String dbname, org.rocksdb.Options options, long timeout) throws java.io.IOException, java.lang.IllegalAccessException
alias - the database aliasdbname - the path to the databaseoptions - the RocksDb options RocksDb.listColumnFamilies optionstimeout - the transaction timeoutTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectTransaction(Alias alias, java.lang.String dbname, org.rocksdb.Options options, java.lang.String derivedClassName) throws java.io.IOException, java.lang.IllegalAccessException
alias - the database aliasdbname - the path to the databaseoptions - the RocksDb options RocksDb.listColumnFamilies optionsderivedClassName - the derived class that will contain the ColumnFamily of the same nameTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectTransaction(Alias alias, java.lang.String dbname, org.rocksdb.Options options, java.lang.String derivedClassName, long timeout) throws java.io.IOException, java.lang.IllegalAccessException
alias - the database aliasdbname - the path to the databaseoptions - the RocksDb options RocksDb.listColumnFamilies optionsderivedClassName - the derived class that will contain the ColumnFamily of the same nametimeout - transaction timeoutTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic 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 options RocksDb.listColumnFamilies optionsderivedClassName - the derived class that will contain the ColumnFamily of the same nameTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectTransaction(java.lang.String dbname, org.rocksdb.Options options, java.lang.String derivedClassName, long timeout) throws java.io.IOException, java.lang.IllegalAccessException
dbname - the path to the databaseoptions - the RocksDb options RocksDb.listColumnFamilies optionsderivedClassName - the derived class that will contain the ColumnFamily of the same nametimeout - the transaction timeoutTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectOptimisticTransaction(java.lang.String dbname, org.rocksdb.Options options) throws java.io.IOException, java.lang.IllegalAccessException
dbname - the path to the databaseoptions - the RocksDb options RocksDb.listColumnFamilies optionsTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectOptimisticTransaction(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 options RocksDb.listColumnFamilies optionsTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectOptimisticTransaction(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 options RocksDb.listColumnFamilies optionsderivedClassName - the derived class that will contain the ColumnFamily of the same nameTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static TransactionSession ConnectOptimisticTransaction(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 options RocksDb.listColumnFamilies optionsderivedClassName - the derived class that will contain the ColumnFamily of the same nameTransactionSession that contains methods we call using ColumnFamilyHandlejava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic 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)options - db options RocksDb.listColumnFamilies optionsSessionjava.io.IOExceptionjava.lang.IllegalAccessExceptionpublic static boolean isDBOffline(java.lang.String dbname)
public static java.util.concurrent.ConcurrentHashMap<java.lang.String,Session> getSessionTable()