|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.data.store.DbUtilities
public final class DbUtilities
Utility methods for database operations needed to implement a DataStore using the com.sun.sgs.service.store.db package. This
class should not be instantiated.
| Nested Class Summary | |
|---|---|
static class |
DbUtilities.Databases
Stores information about the databases that constitute the data store. |
| Method Summary | |
|---|---|
static int |
getClassId(DbEnvironment env,
DbDatabase classesDb,
byte[] classInfo,
long timeout)
Returns the class ID to represent classes with the specified class information. |
static byte[] |
getClassInfo(DbEnvironment env,
DbDatabase classesDb,
int classId,
long timeout)
Returns the class information associated with the specified class ID. |
static DbUtilities.Databases |
getDatabases(DbEnvironment env,
DbTransaction dbTxn,
LoggerWrapper logger)
Opens or creates the Berkeley DB databases for a data store. |
static long |
getNextNodeId(DbDatabase infoDb,
DbTransaction dbTxn,
int blockSize)
Returns the next available node ID and increments the stored value by the specified amount. |
static long |
getNextObjectId(DbDatabase infoDb,
DbTransaction dbTxn,
int blockSize)
Returns the next available object ID and increments the stored value by the specified amount. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DbUtilities.Databases getDatabases(DbEnvironment env,
DbTransaction dbTxn,
LoggerWrapper logger)
env - the database environmentdbTxn - the database transactionlogger - the logger for logging messages
public static long getNextObjectId(DbDatabase infoDb,
DbTransaction dbTxn,
int blockSize)
infoDb - the info databasedbTxn - the transactionblockSize - the number of items to allocate
public static long getNextNodeId(DbDatabase infoDb,
DbTransaction dbTxn,
int blockSize)
infoDb - the info databasedbTxn - the transactionblockSize - the number of node IDs to allocate
public static int getClassId(DbEnvironment env,
DbDatabase classesDb,
byte[] classInfo,
long timeout)
0. The
class information is the serialized form of the ObjectStreamClass instance that serialization uses to represent the
class.
env - the database environmentclassesDb - the classes databaseclassInfo - the class informationtimeout - the timeout to use when creating a transaction
public static byte[] getClassInfo(DbEnvironment env,
DbDatabase classesDb,
int classId,
long timeout)
ObjectStreamClass instance that serialization uses to represent the
class.
env - the database environmentclassesDb - the classes databaseclassId - the class IDtimeout - the transaction timeout for creating a transaction
null if the ID is
not found
IllegalArgumentException - if classId is not greater than
0
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||