|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.Database
com.sleepycat.je.SecondaryDatabase
public class SecondaryDatabase
Javadoc for this public class is generated via the doc templates in the doc_src directory.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sleepycat.je.Database |
---|
Database.DbState |
Field Summary |
---|
Fields inherited from class com.sleepycat.je.Database |
---|
CLOSED, configuration, envHandle, handleLocker, INVALID, OPEN |
Constructor Summary | |
---|---|
SecondaryDatabase(Environment env,
SecondaryConfig secConfig,
Database primaryDatabase)
Creates a secondary database but does not open or fully initialize it. |
Method Summary | |
---|---|
(package private) void |
clearForeignKeyTrigger()
Should be called by the foreignKeyTrigger while holding a write lock on the trigger list. |
(package private) void |
clearPrimary()
Should be called by the secondaryTrigger while holding a write lock on the trigger list. |
void |
close()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
delete(Transaction txn,
DatabaseEntry key)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
get(Transaction txn,
DatabaseEntry key,
DatabaseEntry pKey,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
Database |
getPrimaryDatabase()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
SecondaryConfig |
getPrivateSecondaryConfig()
Returns the secondary config without cloning, for internal use. |
OperationStatus |
getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry pKey,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
SecondaryConfig |
getSecondaryConfig()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) void |
initExisting(Environment env,
Locker locker,
DatabaseImpl database,
DatabaseConfig dbConfig)
Open a database, called by Environment |
(package private) void |
initNew(Environment env,
Locker locker,
String databaseName,
DatabaseConfig dbConfig)
Create a database, called by Environment |
JoinCursor |
join(Cursor[] cursors,
JoinConfig config)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) Cursor |
newDbcInstance(Transaction txn,
CursorConfig cursorConfig)
Overrides Database method. |
(package private) static UnsupportedOperationException |
notAllowedException()
|
(package private) void |
onForeignKeyDelete(Locker locker,
DatabaseEntry secKey)
Called by the ForeignKeyTrigger when a record in the foreign database is deleted. |
SecondaryCursor |
openSecondaryCursor(Transaction txn,
CursorConfig cursorConfig)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
putNoDupData(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
putNoOverwrite(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) DatabaseException |
secondaryCorruptException()
|
(package private) void |
trace(Level level,
String methodName)
Send trace messages to the java.util.logger. |
int |
truncate(Transaction txn,
boolean countRecords)
Deprecated. |
(package private) void |
updateSecondary(Locker locker,
Cursor cursor,
DatabaseEntry priKey,
DatabaseEntry oldData,
DatabaseEntry newData)
Updates a single secondary when a put() or delete() is performed on the primary. |
Methods inherited from class com.sleepycat.je.Database |
---|
addCursor, addTrigger, checkEnv, checkProhibitedDbState, checkRequiredDbState, deleteInternal, getConfig, getDatabaseImpl, getDatabaseName, getDebugName, getEnvironment, getSecondaryDatabases, getStats, hasTriggers, invalidate, isTransactional, isWritable, notifyTriggers, openCursor, openSequence, preload, preload, putInternal, removeCursor, removeSequence, removeTrigger, setHandleLocker, trace, trace, truncateInternal, verify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
SecondaryDatabase(Environment env, SecondaryConfig secConfig, Database primaryDatabase) throws DatabaseException
DatabaseException
Method Detail |
---|
void initNew(Environment env, Locker locker, String databaseName, DatabaseConfig dbConfig) throws DatabaseException
initNew
in class Database
DatabaseException
void initExisting(Environment env, Locker locker, DatabaseImpl database, DatabaseConfig dbConfig) throws DatabaseException
initExisting
in class Database
DatabaseException
public void close() throws DatabaseException
close
in class Database
DatabaseException
void clearPrimary()
void clearForeignKeyTrigger()
public Database getPrimaryDatabase() throws DatabaseException
DatabaseException
public SecondaryConfig getSecondaryConfig() throws DatabaseException
DatabaseException
public SecondaryConfig getPrivateSecondaryConfig()
public SecondaryCursor openSecondaryCursor(Transaction txn, CursorConfig cursorConfig) throws DatabaseException
DatabaseException
Cursor newDbcInstance(Transaction txn, CursorConfig cursorConfig) throws DatabaseException
newDbcInstance
in class Database
DatabaseException
public OperationStatus delete(Transaction txn, DatabaseEntry key) throws DatabaseException
delete
in class Database
DatabaseException
public OperationStatus get(Transaction txn, DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
get
in class Database
DatabaseException
public OperationStatus get(Transaction txn, DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getSearchBoth(Transaction txn, DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
getSearchBoth
in class Database
DatabaseException
public OperationStatus getSearchBoth(Transaction txn, DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus put(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
put
in class Database
DatabaseException
public OperationStatus putNoOverwrite(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
putNoOverwrite
in class Database
DatabaseException
public OperationStatus putNoDupData(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
putNoDupData
in class Database
DatabaseException
public JoinCursor join(Cursor[] cursors, JoinConfig config) throws DatabaseException
join
in class Database
DatabaseException
public int truncate(Transaction txn, boolean countRecords) throws DatabaseException
truncate
in class Database
DatabaseException
void updateSecondary(Locker locker, Cursor cursor, DatabaseEntry priKey, DatabaseEntry oldData, DatabaseEntry newData) throws DatabaseException
locker
- the internal locker.cursor
- secondary cursor to use, or null if this method should
open and close a cursor if one is needed.priKey
- the primary key.oldData
- the primary data before the change, or null if the record
did not previously exist.newData
- the primary data after the change, or null if the record
has been deleted.
DatabaseException
void onForeignKeyDelete(Locker locker, DatabaseEntry secKey) throws DatabaseException
secKey
- is the primary key of the foreign database, which is the
secondary key (ordinary key) of this secondary database.
DatabaseException
DatabaseException secondaryCorruptException() throws DatabaseException
DatabaseException
static UnsupportedOperationException notAllowedException()
void trace(Level level, String methodName) throws DatabaseException
DatabaseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |