| Package | Description |
|---|---|
| com.sleepycat.je |
Foundation for creating environments, databases and transactions; provides
cursor based data access.
|
| com.sleepycat.je.cleaner |
INTERNAL: disk garbage collection.
|
| com.sleepycat.je.dbi |
INTERNAL: Underlying XxxImpl classes for Environment, Database and Cursor,
plus other misc classes (originally, dbi meant "db internal interface").
|
| com.sleepycat.je.rep |
Berkeley DB Java Edition High Availability (JE HA) enables replication of JE
environments.
|
| com.sleepycat.je.rep.impl |
INTERNAL: Top level HA implementation classes.
|
| com.sleepycat.je.rep.txn |
INTERNAL: HA Txn/Locker subclasses for enforcing consistency and durability
constraints.
|
| com.sleepycat.je.tree |
INTERNAL: Btree data structure (the JE main cache), including persistent
nodes classes, and Btree access methods.
|
| com.sleepycat.je.txn |
INTERNAL: Transaction management and locking (concurrency control).
|
| Modifier and Type | Method and Description |
|---|---|
static Locker |
DbInternal.getLocker(Transaction txn)
Proxy to Transaction.getLocker()
|
| Modifier and Type | Method and Description |
|---|---|
static Cursor |
DbInternal.makeCursor(DatabaseImpl databaseImpl,
Locker locker,
CursorConfig cursorConfig)
Create a Cursor for internal use from a DatabaseImpl.
|
static Cursor |
DbInternal.makeCursor(DatabaseImpl databaseImpl,
Locker locker,
CursorConfig cursorConfig,
boolean retainNonTxnLocks)
Create a Cursor for internal use from a DatabaseImpl, specifying
retainNonTxnLocks.
|
static Cursor |
DbInternal.makeCursor(Database dbHandle,
Locker locker,
CursorConfig cursorConfig)
Create a Cursor from a DatabaseHandle.
|
static Cursor |
DbInternal.makeCursor(Database dbHandle,
Locker locker,
CursorConfig cursorConfig,
boolean retainNonTxnLocks) |
static boolean |
DbInternal.readPrimaryAfterGet(Cursor cursor,
Database priDb,
DatabaseEntry key,
DatabaseEntry pKey,
DatabaseEntry data,
LockMode lockMode,
boolean secDirtyRead,
boolean lockPrimaryOnly,
boolean allowNoData,
Locker locker,
SecondaryDatabase secDb,
SecondaryAssociation secAssoc)
Proxy to Cursor.readPrimaryAfterGet
|
| Constructor and Description |
|---|
DeadlockException(Locker locker,
String message)
For internal use only.
|
DeleteConstraintException(Locker locker,
String message,
String secDbName,
String priDbName,
DatabaseEntry secKey,
DatabaseEntry priKey,
long priLsn,
long expirationTime,
ExtinctionFilter.ExtinctionStatus extinctionStatus)
For internal use only.
|
DiskLimitException(Locker locker,
String message)
For internal use only.
|
ForeignConstraintException(Locker locker,
String message,
String secDbName,
String priDbName,
DatabaseEntry secKey,
DatabaseEntry priKey,
long priLsn,
long expirationTime,
ExtinctionFilter.ExtinctionStatus extinctionStatus)
For internal use only.
|
LockConflictException(Locker locker,
String message)
For internal use only.
|
LockConflictException(Locker locker,
String message,
Throwable cause)
For internal use only.
|
LockNotAvailableException(Locker locker,
String message)
For internal use only.
|
LockNotGrantedException(Locker locker,
String message)
Deprecated.
For internal use only.
|
LockTimeoutException(Locker locker,
String message)
For internal use only.
|
OperationFailureException(Locker locker,
boolean abortOnly,
String message,
Throwable cause)
For internal use only.
|
SecondaryConstraintException(Locker locker,
String message,
String secDbName,
String priDbName,
DatabaseEntry secKey,
DatabaseEntry priKey,
long priLsn,
long expirationTime,
ExtinctionFilter.ExtinctionStatus extinctionStatus)
For internal use only.
|
SecondaryIntegrityException(Database secDb,
Locker locker,
String message,
String secDbName,
String priDbName,
DatabaseEntry secKey,
DatabaseEntry priKey,
long priLsn,
long expirationTime,
ExtinctionFilter.ExtinctionStatus extinctionStatus)
For internal use only.
|
SecondaryReferenceException(Locker locker,
String message,
String secDbName,
String priDbName,
DatabaseEntry secKey,
DatabaseEntry priKey,
long priLsn,
long expirationTime,
ExtinctionFilter.ExtinctionStatus extinctionStatus)
For internal use only.
|
TransactionTimeoutException(Locker locker,
String message)
For internal use only.
|
UniqueConstraintException(Locker locker,
String message,
String secDbName,
String priDbName,
DatabaseEntry secKey,
DatabaseEntry priKey,
long priLsn,
long expirationTime,
ExtinctionFilter.ExtinctionStatus extinctionStatus)
For internal use only.
|
XAFailureException(Locker locker)
For internal use only.
|
| Modifier and Type | Method and Description |
|---|---|
long |
ExtinctionScanner.discardExtinctRecords(@NonNull Locker locker,
@NonNull Set<String> dbNames,
@Nullable DatabaseEntry beginKey,
@Nullable DatabaseEntry endKey,
@Nullable ScanFilter filter,
@NonNull String label)
Inserts the scan record in the DB and queues the scan for execution.
|
| Modifier and Type | Method and Description |
|---|---|
Locker |
CursorImpl.getLocker() |
| Modifier and Type | Method and Description |
|---|---|
DatabaseImpl |
DbTree.createDb(Locker locker,
String databaseName,
DatabaseConfig dbConfig,
HandleLocker handleLocker)
Creates a new database object given a database name.
|
DatabaseImpl |
DbTree.createInternalDb(Locker locker,
String databaseName,
DatabaseConfig dbConfig)
Create a database for internal use.
|
OperationFailureException |
EnvironmentImpl.createLockPreemptedException(Locker locker,
Throwable cause)
For replicated environments only; only the overridden method should
ever be called.
|
DatabaseImpl |
DbTree.createReplicaDb(Locker locker,
String databaseName,
DatabaseConfig dbConfig,
NameLN replicatedLN,
ReplicationContext repContext)
Create a replicated database on this replica node.
|
DatabaseImpl |
DbTree.dbRemove(Locker locker,
String databaseName,
DatabaseId checkId)
Stand alone and Master invocations.
|
DatabaseImpl |
DbTree.dbRename(Locker locker,
String databaseName,
String newName)
Stand alone and Master invocations.
|
DatabaseImpl |
DbTree.getDb(Locker nameLocker,
String databaseName,
HandleLocker handleLocker,
boolean writeLock)
Get a database object given a database name.
|
DatabaseId |
DbTree.getDbIdFromName(Locker nameLocker,
String databaseName,
HandleLocker handleLocker,
boolean writeLock)
Get a database ID given a database name.
|
static void |
TriggerManager.invokeAddRemoveTriggers(Locker locker,
List<Trigger> oldTriggers,
List<Trigger> newTriggers)
Invoke the triggers associated with the addition or removal of the
trigger itself.
|
static void |
CursorImpl.lockAfterLsnChange(DatabaseImpl dbImpl,
long oldLsn,
long newLsn,
Locker excludeLocker)
After logging a deferred-write LN during eviction/checkpoint or a
migrated LN during cleaning, for every existing lock on the old LSN held
by another locker, we must lock the new LSN on behalf of that locker.
|
void |
DbTree.removeReplicaDb(Locker locker,
String databaseName,
DatabaseId checkId,
DbOpReplicationContext repContext)
Replica invocations.
|
DatabaseImpl |
DbTree.renameReplicaDb(Locker locker,
String databaseName,
String newName,
NameLN replicatedLN,
DbOpReplicationContext repContext)
Replica invocations.
|
static void |
TriggerManager.runCloseTriggers(Locker locker,
DatabaseImpl dbImpl)
Invokes the trigger methods associated with the closing of a database.
|
static void |
TriggerManager.runDeleteTriggers(Locker locker,
DatabaseImpl dbImpl,
DatabaseEntry key,
DatabaseEntry oldData)
Invokes the trigger methods associated with a delete operation.
|
static void |
TriggerManager.runOpenTriggers(Locker locker,
Database db,
boolean isNew)
Invokes the trigger methods associated with the opening of a database.
|
static void |
TriggerManager.runOpenTriggers(Locker locker,
DatabaseImpl dbImpl,
boolean isNew)
Invokes the trigger methods associated with the opening of a database.
|
static void |
TriggerManager.runPutTriggers(Locker locker,
DatabaseImpl dbImpl,
DatabaseEntry key,
DatabaseEntry oldData,
DatabaseEntry newData)
Invokes the trigger methods associated with a put operation.
|
static void |
TriggerManager.runRemoveTriggers(Locker locker,
DatabaseImpl dbImpl)
Invokes the trigger methods associated with the removal of a database.
|
static void |
TriggerManager.runRenameTriggers(Locker locker,
DatabaseImpl dbImpl,
String newName)
Invokes the trigger methods associated with the renaming of a database.
|
static void |
TriggerManager.runTruncateTriggers(Locker locker,
DatabaseImpl newDb)
Invokes the trigger methods associated with the truncation of a
database.
|
void |
DatabaseImpl.setConfigProperties(Locker locker,
String dbName,
DatabaseConfig dbConfig,
EnvironmentImpl envImpl) |
boolean |
DatabaseImpl.setTriggers(Locker locker,
String dbName,
List<Trigger> newTriggers,
boolean overridePersistentTriggers)
Sets the list of triggers associated with the database.
|
DbTree.TruncateDbResult |
DbTree.truncate(Locker locker,
String databaseName,
boolean returnCount) |
DbTree.TruncateDbResult |
DbTree.truncateReplicaDb(Locker locker,
String databaseName,
boolean returnCount,
NameLN replicatedLN,
DbOpReplicationContext repContext) |
void |
DbTree.updateNameLN(Locker locker,
String dbName,
DbOpReplicationContext repContext)
Update the NameLN for the DatabaseImpl when the DatabaseConfig changes.
|
| Constructor and Description |
|---|
CursorImpl(DatabaseImpl database,
Locker locker)
Creates a cursor with retainNonTxnLocks=true, isSecondaryCursor=false.
|
CursorImpl(DatabaseImpl dbImpl,
Locker locker,
boolean retainNonTxnLocks,
boolean isSecondaryCursor)
Creates a cursor.
|
DatabaseImpl(Locker locker,
String dbName,
DatabaseId id,
EnvironmentImpl envImpl,
DatabaseConfig dbConfig)
Create a database object for a new database.
|
| Constructor and Description |
|---|
InsufficientReplicasException(Locker locker,
Durability.ReplicaAckPolicy ackPolicy,
int requiredAckCount,
Set<String> availableReplicas)
Creates a Commit exception.
|
LockPreemptedException(Locker locker,
Throwable cause)
For internal use only.
|
ReplicaWriteException(Locker locker,
StateChangeEvent stateChangeEvent)
For internal use only.
|
StateChangeException(Locker locker,
StateChangeEvent stateChangeEvent)
For internal use only.
|
UnknownMasterException(Locker locker,
StateChangeEvent stateChangeEvent) |
| Modifier and Type | Method and Description |
|---|---|
void |
RepImpl.checkIfMaster(Locker locker)
Ensures that the environment is currently a Master before proceeding
with an operation that requires it to be the master.
|
LockPreemptedException |
RepImpl.createLockPreemptedException(Locker locker,
Throwable cause) |
| Modifier and Type | Class and Description |
|---|---|
class |
MasterThreadLocker
A MasterThreadLocker is used with a user initiated non-transactional
operation on a Master, for a replicated DB.
|
class |
MasterTxn
A MasterTxn represents:
- a user initiated Txn executed on the Master node, when local-write and
read-only are not configured, or
- an auto-commit Txn on the Master node for a replicated DB.
|
class |
ReadonlyTxn
A ReadonlyTxn represents
- a user initiated Txn executed on the Master node, when local-write or
read-only is configured, or
- a user initiated Txn executed on the Replica node, whether or not
local-write is configured, or
- an auto-commit Txn on a Replica node for a replicated DB.
|
class |
ReplayTxn
Used for replaying replicated operations at replica nodes.
|
class |
ReplicaThreadLocker
A ReplicaThreadLocker is used with a user initiated non-transactional
operation on a Replica, for a replicated DB.
|
| Modifier and Type | Method and Description |
|---|---|
LogItem |
LN.log(EnvironmentImpl envImpl,
DatabaseImpl dbImpl,
Locker locker,
WriteLockInfo writeLockInfo,
boolean newEmbeddedLN,
byte[] newKey,
int newExpiration,
boolean newExpirationInHours,
boolean currEmbeddedLN,
long currLsn,
int currSize,
boolean isInsertion,
boolean backgroundIO,
ReplicationContext repContext)
Convenience logging method, used to migrate an LN during cleaning.
|
LogItem |
LN.optionalLog(EnvironmentImpl envImpl,
DatabaseImpl dbImpl,
Locker locker,
WriteLockInfo writeLockInfo,
boolean newEmbeddedLN,
byte[] newKey,
int newExpiration,
boolean newExpirationInHours,
boolean currEmbeddedLN,
long currLsn,
int currSize,
boolean isInsertion,
ReplicationContext repContext)
Convenience logging method.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BasicLocker
A non-transactional Locker that simply tracks locks and releases them when
releaseNonTxnLocks or operationEnd is called.
|
class |
BuddyLocker
Extends BasicLocker to share locks with another specific locker.
|
class |
HandleLocker
Extends BasicLocker to share locks with another Locker that is being used to
open a database.
|
class |
PreparedTxn
A PreparedTxn is used at recovery for processing a TXN_PREPARE log entry.
|
class |
ReadCommittedLocker
Extends BuddyLocker to acquire write locks using the buddy locker (the
transaction locker).
|
class |
ThreadLocker
Extends BasicLocker to share locks among all lockers for the same thread.
|
class |
Txn
A Txn is the internal representation of a transaction created by a call to
Environment.txnBegin.
|
| Modifier and Type | Field and Description |
|---|---|
protected Locker |
LockInfo.locker |
| Modifier and Type | Method and Description |
|---|---|
static Locker |
LockerFactory.getInternalReadOperationLocker(EnvironmentImpl envImpl)
Get a non-transactional locker for internal database operations.
|
Locker |
LockInfo.getLocker() |
static Locker |
LockerFactory.getReadableLocker(Database dbHandle,
Locker locker,
boolean readCommittedIsolation)
Get a locker for this database handle for a read or cursor operation.
|
static Locker |
LockerFactory.getReadableLocker(Database dbHandle,
Transaction userTxn,
boolean readCommittedIsolation)
Get a locker for a read or cursor operation.
|
static Locker |
LockerFactory.getWritableLocker(Environment env,
Transaction userTxn,
boolean isInternalDb,
boolean dbIsTransactional,
boolean autoTxnIsReplicated)
Get a locker for a write operation, checking whether the db and
environment is transactional or not.
|
static Locker |
LockerFactory.getWritableLocker(Environment env,
Transaction userTxn,
boolean isInternalDb,
boolean dbIsTransactional,
boolean autoTxnIsReplicated,
TransactionConfig autoCommitConfig)
Get a locker for a write operation.
|
Locker |
LockImpl.getWriteOwnerLocker()
Return the locker that has a write ownership on this lock.
|
Locker |
ThinLockImpl.getWriteOwnerLocker() |
Locker |
BasicLocker.getWriteOwnerLocker(long lsn)
Get the txn that owns the lock on this node.
|
Locker |
DummyLockManager.getWriteOwnerLocker(Long lsn) |
abstract Locker |
LockManager.getWriteOwnerLocker(Long lsn) |
Locker |
SyncedLockManager.getWriteOwnerLocker(Long lsn) |
Locker |
Txn.newNonTxnLocker()
Returns 'this', since this locker holds no non-transactional locks.
|
Locker |
BasicLocker.newNonTxnLocker()
Throws EnvironmentFailureException unconditionally.
|
abstract Locker |
Locker.newNonTxnLocker()
Creates a fresh non-transactional locker, while retaining any
transactional locks held by this locker.
|
Locker |
ThreadLocker.newNonTxnLocker()
Returns a new non-transactional locker that shares locks with this
locker by virtue of being a ThreadLocker for the same thread.
|
Locker |
ReadCommittedLocker.newNonTxnLocker()
Returns a new ReadCommittedLocker that shares locks with this locker by
virtue of both lockers only holding READ locks.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Locker> |
LockImpl.release(Locker locker,
MemoryBudget mb,
int lockTableIndex)
Releases a lock and moves the next waiter(s) to the owners.
|
Set<Locker> |
ThinLockImpl.release(Locker locker,
MemoryBudget mb,
int lockTableIndex) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
TxnManager.areOtherSerializableTransactionsActive(Locker excludeLocker)
Returns whether there are any active serializable transactions,
excluding the transaction given (if non-null).
|
void |
BuddyLocker.checkPreempted(Locker allowPreemptedLocker)
Forwards to the parent buddy locker, so the buddy can check itself and
all of its child buddies.
|
void |
Txn.checkPreempted(Locker allowPreemptedLocker)
Checks for preemption in this locker and all its child buddies.
|
void |
Locker.checkPreempted(Locker allowPreemptedLocker)
Called when obtaining a lock to cause a LockPreemptedException to be
thrown if a lock was preempted earlier.
|
void |
ThreadLocker.checkPreempted(Locker allowPreemptedLocker)
Checks for preemption in all thread lockers for this thread.
|
static BuddyLocker |
BuddyLocker.createBuddyLocker(EnvironmentImpl env,
Locker buddy) |
static HandleLocker |
HandleLocker.createHandleLocker(EnvironmentImpl env,
Locker buddy) |
static ReadCommittedLocker |
ReadCommittedLocker.createReadCommittedLocker(EnvironmentImpl env,
Locker buddy) |
void |
LockImpl.demote(Locker locker)
Downgrade a write lock to a read lock.
|
void |
ThinLockImpl.demote(Locker locker) |
void |
LockImpl.flushWaiter(Locker locker,
MemoryBudget mb,
int lockTableIndex)
Remove this locker from the waiter list.
|
void |
ThinLockImpl.flushWaiter(Locker locker,
MemoryBudget mb,
int lockTableIndex) |
LockType |
LockImpl.getOwnedLockType(Locker locker) |
LockType |
ThinLockImpl.getOwnedLockType(Locker locker) |
LockType |
DummyLockManager.getOwnedLockType(Long lsn,
Locker locker) |
abstract LockType |
LockManager.getOwnedLockType(Long lsn,
Locker locker)
Returns the LockType if the given locker owns a lock on the given node,
or null if the lock is not owned.
|
LockType |
SyncedLockManager.getOwnedLockType(Long lsn,
Locker locker) |
static Locker |
LockerFactory.getReadableLocker(Database dbHandle,
Locker locker,
boolean readCommittedIsolation)
Get a locker for this database handle for a read or cursor operation.
|
boolean |
LockImpl.isOwnedWriteLock(Locker locker)
Return true if locker is an owner of this Lock and this is a write
lock.
|
boolean |
ThinLockImpl.isOwnedWriteLock(Locker locker) |
boolean |
LockImpl.isOwner(Locker locker,
LockType lockType)
Return true if locker is an owner of this Lock for lockType,
false otherwise.
|
boolean |
ThinLockImpl.isOwner(Locker locker,
LockType lockType) |
boolean |
LockImpl.isWaiter(Locker locker)
Return true if locker is a waiter on this Lock.
|
boolean |
ThinLockImpl.isWaiter(Locker locker) |
LockAttemptResult |
LockImpl.lock(LockType requestType,
Locker locker,
boolean nonBlockingRequest,
boolean jumpAheadOfWaiters,
MemoryBudget mb,
int lockTableIndex)
Attempts to acquire the lock and returns the LockGrantType.
|
LockAttemptResult |
ThinLockImpl.lock(LockType requestType,
Locker locker,
boolean nonBlockingRequest,
boolean jumpAheadOfWaiters,
MemoryBudget mb,
int lockTableIndex) |
LockGrantType |
LockManager.lock(long lsn,
Locker locker,
LockType type,
long timeout,
boolean nonBlockingRequest,
boolean jumpAheadOfWaiters,
DatabaseImpl database)
Attempt to acquire a lock of 'type' on 'lsn'.
|
boolean |
DummyLockManager.ownsOrSharesLock(Locker locker,
Long lsn) |
abstract boolean |
LockManager.ownsOrSharesLock(Locker locker,
Long lsn) |
boolean |
SyncedLockManager.ownsOrSharesLock(Locker locker,
Long lsn) |
Set<Locker> |
LockImpl.release(Locker locker,
MemoryBudget mb,
int lockTableIndex)
Releases a lock and moves the next waiter(s) to the owners.
|
Set<Locker> |
ThinLockImpl.release(Locker locker,
MemoryBudget mb,
int lockTableIndex) |
boolean |
LockManager.release(long lsn,
Locker locker)
Release a lock and possibly notify any waiters that they have been
granted the lock.
|
void |
Locker.setClosingLocker(Locker closingLocker)
This method is called to set the closingLocker when a cursor has been
duplicated prior to being moved.
|
boolean |
HandleLocker.sharesLocksWith(Locker other)
Returns whether this locker can share locks with the given locker.
|
boolean |
BuddyLocker.sharesLocksWith(Locker other)
Returns whether this locker can share locks with the given locker.
|
boolean |
Locker.sharesLocksWith(Locker other)
Returns whether this locker can share locks with the given locker.
|
boolean |
ThreadLocker.sharesLocksWith(Locker other)
Returns whether this locker can share locks with the given locker.
|
void |
LockImpl.stealLock(@Nullable Locker locker,
MemoryBudget mb,
int lockTableIndex) |
void |
ThinLockImpl.stealLock(@Nullable Locker locker,
MemoryBudget mb,
int lockTableIndex) |
LockAttemptResult |
DummyLockManager.stealLock(Long lsn,
Locker locker,
LockType lockType) |
abstract LockAttemptResult |
LockManager.stealLock(Long lsn,
Locker locker,
LockType lockType) |
LockAttemptResult |
SyncedLockManager.stealLock(Long lsn,
Locker locker,
LockType lockType) |
| Constructor and Description |
|---|
BuddyLocker(EnvironmentImpl env,
Locker buddy)
Creates a BuddyLocker.
|
HandleLocker(EnvironmentImpl env,
Locker buddy)
Creates a HandleLocker.
|
LockInfo(Locker locker,
LockType lockType)
Construct a new LockInfo.
|
Copyright © 2024. All rights reserved.