Package com.netscape.cmscore.dbs
Class DBSubsystem
java.lang.Object
com.netscape.cmscore.dbs.DBSubsystem
A class represents the database subsystem that manages
the backend data storage.
This subsystem maintains multiple sessions that allows
operations to be performed, and provide a registry
where all the schema information is stored.
- Version:
- $Revision$, $Date$
- Author:
- thomask
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static org.slf4j.Logger
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a database session.boolean
Retrieves base DN of backend database.Retrieves DB subsystem configuration store.boolean
getEntryAttribute
(String dn, String attrName, String defaultValue, String errorValue) getId()
Retrieves subsystem identifier.Retrieves internal DB configuration store.Retrieves LDAP connection info (host, port, secure)Retrieves the registry.void
init
(DatabaseConfig dbConfig, LDAPConfig ldapConfig, PKISocketConfig socketConfig, IPasswordStore passwordStore) Initializes the internal registry.void
returnConn
(netscape.ldap.LDAPConnection conn) void
setEnableSerialMgmt
(boolean v) void
Sets subsystem identifier.void
setNextSerialConfig
(BigInteger serial) void
shutdown()
Shutdowns this subsystem gracefully.
-
Field Details
-
logger
public static org.slf4j.Logger logger -
ID
- See Also:
-
PROP_ENABLE_SERIAL_NUMBER_RECOVERY
- See Also:
-
PROP_NEXT_SERIAL_NUMBER
- See Also:
-
PROP_MIN_SERIAL_NUMBER
- See Also:
-
PROP_MAX_SERIAL_NUMBER
- See Also:
-
PROP_NEXT_MIN_SERIAL_NUMBER
- See Also:
-
PROP_NEXT_MAX_SERIAL_NUMBER
- See Also:
-
PROP_SERIAL_LOW_WATER_MARK
- See Also:
-
PROP_SERIAL_INCREMENT
- See Also:
-
PROP_SERIAL_BASEDN
- See Also:
-
PROP_SERIAL_RANGE_DN
- See Also:
-
PROP_MIN_REQUEST_NUMBER
- See Also:
-
PROP_MAX_REQUEST_NUMBER
- See Also:
-
PROP_NEXT_MIN_REQUEST_NUMBER
- See Also:
-
PROP_NEXT_MAX_REQUEST_NUMBER
- See Also:
-
PROP_REQUEST_LOW_WATER_MARK
- See Also:
-
PROP_REQUEST_INCREMENT
- See Also:
-
PROP_REQUEST_BASEDN
- See Also:
-
PROP_REQUEST_RANGE_DN
- See Also:
-
PROP_MIN_REPLICA_NUMBER
- See Also:
-
PROP_MAX_REPLICA_NUMBER
- See Also:
-
PROP_NEXT_MIN_REPLICA_NUMBER
- See Also:
-
PROP_NEXT_MAX_REPLICA_NUMBER
- See Also:
-
PROP_REPLICA_LOW_WATER_MARK
- See Also:
-
PROP_REPLICA_INCREMENT
- See Also:
-
PROP_REPLICA_BASEDN
- See Also:
-
PROP_REPLICA_RANGE_DN
- See Also:
-
PROP_INFINITE_SERIAL_NUMBER
- See Also:
-
PROP_INFINITE_REQUEST_NUMBER
- See Also:
-
PROP_INFINITE_REPLICA_NUMBER
- See Also:
-
PROP_NEXT_RANGE
- See Also:
-
PROP_ENABLE_SERIAL_MGMT
- See Also:
-
-
Constructor Details
-
DBSubsystem
public DBSubsystem()Constructs database subsystem.
-
-
Method Details
-
getId
Retrieves subsystem identifier. -
setId
Sets subsystem identifier.- Throws:
EBaseException
-
enableSerialNumberRecovery
public boolean enableSerialNumberRecovery() -
getEnableSerialMgmt
public boolean getEnableSerialMgmt() -
setEnableSerialMgmt
- Throws:
EBaseException
-
setNextSerialConfig
- Throws:
EBaseException
-
init
public void init(DatabaseConfig dbConfig, LDAPConfig ldapConfig, PKISocketConfig socketConfig, IPasswordStore passwordStore) throws EBaseException Initializes the internal registry. Connects to the data source, and create a pool of connection of which applications can use. Optionally, check the integrity of the database.- Throws:
EBaseException
-
getEntryAttribute
-
getLDAPConfig
Retrieves internal DB configuration store. -
getDBConfigStore
Retrieves DB subsystem configuration store. -
getBaseDN
Retrieves base DN of backend database. -
getLdapConnInfo
Retrieves LDAP connection info (host, port, secure) -
getLdapAuthInfo
-
shutdown
public void shutdown()Shutdowns this subsystem gracefully. -
getRegistry
Retrieves the registry. -
createSession
Creates a database session.- Throws:
EDBException
-
returnConn
public void returnConn(netscape.ldap.LDAPConnection conn)
-