| Package | Description |
|---|---|
| com.sleepycat.bind.serial |
Bindings that use Java serialization.
|
| com.sleepycat.collections |
Data access based on the standard Java collections API.
|
| com.sleepycat.compat |
INTERNAL: BDB/JE compatibility layer for bind, collections, DPL packages.
|
| 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.evictor |
INTERNAL: Evicts data from the main and off-heap caches when they overflow.
|
| com.sleepycat.je.incomp |
INTERNAL: IN compressor performs background deletion of defunct IN slots
and deletes empty INs.
|
| com.sleepycat.je.log |
INTERNAL: Low level data storage including log entry sequential
logging/writing, random reading/fetching, and sequential reading.
|
| com.sleepycat.je.log.entry |
INTERNAL: Classes for serializing/materializing log entries.
|
| com.sleepycat.je.recovery |
INTERNAL: Performs recovery/startup processing during Environment open, and
checkpoints to bound recovery time.
|
| com.sleepycat.je.rep |
Berkeley DB Java Edition High Availability (JE HA) enables replication of JE
environments.
|
| com.sleepycat.je.rep.arbiter |
Provides a mechanism to allow write availability for the Replication
group even when the number of replication nodes is less than majority.
|
| com.sleepycat.je.rep.arbiter.impl |
INTERNAL: Implementation classes for the arbiter node.
|
| com.sleepycat.je.rep.impl |
INTERNAL: Top level HA implementation classes.
|
| com.sleepycat.je.rep.impl.networkRestore |
INTERNAL: Protocol for
network restore. |
| com.sleepycat.je.rep.impl.node |
INTERNAL: Feeder and Replica node implementations.
|
| com.sleepycat.je.rep.monitor |
BDB JE HA support for applications that need to track the composition of a
replication group, in order to do tasks such as load balancing and
request routing.
|
| com.sleepycat.je.rep.stream |
INTERNAL: Feeding and syncup (init) of rep stream from master node to
other node types (replicas, etc).
|
| com.sleepycat.je.rep.txn |
INTERNAL: HA Txn/Locker subclasses for enforcing consistency and durability
constraints.
|
| com.sleepycat.je.rep.util.ldiff |
INTERNAL: LDiff debugging utility for comparing databases on different
nodes in a group.
|
| com.sleepycat.je.rep.utilint |
INTERNAL: Command line and programmatic utilities.
|
| com.sleepycat.je.rep.vlsn |
INTERNAL: VLSN index (in-memory and persistent) for mapping VLSNs to LSNs.
|
| com.sleepycat.je.statcap |
INTERNAL: Statistics capture and output to je.stat.csv file.
|
| 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).
|
| com.sleepycat.je.util |
Supporting utilities.
|
| com.sleepycat.je.util.verify |
INTERNAL: Scheduled data verifier and Btree verification.
|
| com.sleepycat.je.utilint |
INTERNAL: Misc utility classes, including some stat classes.
|
| com.sleepycat.persist |
The Direct Persistence Layer (DPL) adds a persistent object model to the
Berkeley DB transactional engine.
|
| com.sleepycat.persist.evolve |
Utilities for managing class evolution of persistent objects.
|
| com.sleepycat.persist.impl |
INTERNAL: Direct Persistence Layer (DPL) implementation.
|
| com.sleepycat.persist.raw |
Raw data access for general purpose tools and manual conversions.
|
| com.sleepycat.util.keyrange |
INTERNAL: Key range cursor operations for use in collections API and DPL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ClassCatalog.close()
Close a catalog database and release any cached resources.
|
void |
StoredClassCatalog.close() |
ObjectStreamClass |
ClassCatalog.getClassFormat(byte[] classID)
Return the ObjectStreamClass for the given class ID.
|
ObjectStreamClass |
StoredClassCatalog.getClassFormat(byte[] classID) |
byte[] |
ClassCatalog.getClassID(ObjectStreamClass classDesc)
Return the class ID for the current version of the given class
description.
|
byte[] |
StoredClassCatalog.getClassID(ObjectStreamClass classFormat) |
| Constructor and Description |
|---|
StoredClassCatalog(Database database)
Creates a catalog based on a given database.
|
| Modifier and Type | Method and Description |
|---|---|
Transaction |
CurrentTransaction.abortTransaction()
Aborts the transaction that is active for the current thread for this
environment and makes the parent transaction (if any) the current
transaction.
|
void |
PrimaryKeyAssigner.assignKey(DatabaseEntry keyData)
Assigns a new primary key value into the given buffer.
|
Transaction |
CurrentTransaction.beginTransaction(TransactionConfig config)
Begins a new transaction for this environment and associates it with
the current thread.
|
Transaction |
CurrentTransaction.commitTransaction()
Commits the transaction that is active for the current thread for this
environment and makes the parent transaction (if any) the current
transaction.
|
void |
TransactionRunner.run(TransactionWorker worker)
Calls the
TransactionWorker.doWork() method and, for transactional
environments, may begin and end a transaction. |
| Modifier and Type | Class and Description |
|---|---|
class |
CorruptSecondariesException
Thrown by
Environment.openDatabase if one or
more corrupt SecondaryDatabases are detected. |
class |
DatabaseExistsException
Thrown by
Environment.openDatabase and
Environment.openSecondaryDatabase
if the database already exists and the DatabaseConfig
ExclusiveCreate parameter is true. |
class |
DatabaseNotFoundException
Thrown when an operation requires a database and that database does not
exist.
|
class |
DeadlockException
Thrown when a deadlock is detected.
|
class |
DeleteConstraintException
Thrown when an attempt is made to delete a key from a foreign key database,
when that key is referenced by a secondary database, and the secondary is
configured to cause an abort in this situation.
|
class |
DiskLimitException
Thrown when a write operation cannot be performed because a disk limit has
been violated.
|
class |
DiskOrderedCursorProducerException
Thrown by
ForwardCursor.getNext when a
DiskOrderedCursor producer thread throws an exception. |
class |
DuplicateDataException
Thrown by
Cursor.putCurrent if the old and new
data are not equal according to the configured duplicate comparator or
default comparator. |
class |
EnvironmentFailureException
Indicates that a failure has occurred that could impact the
Environment as a whole. |
class |
EnvironmentLockedException
Thrown by the
Environment constructor when an environment cannot be
opened for write access because another process has the same environment
open for write access. |
class |
EnvironmentNotFoundException
Thrown by the
Environment constructor when EnvironmentConfig
AllowCreate property is false (environment creation is not permitted), but
there are no log files in the environment directory. |
class |
EnvironmentWedgedException
Thrown by the
Environment.close() when the current process must be
shut down and restarted before re-opening the Environment. |
class |
ForeignConstraintException
Thrown when an attempt to write a primary database record would insert a
secondary record with a key that does not exist in a foreign key database,
when the secondary key is configured as a foreign key.
|
class |
LockConflictException
The common base class for all exceptions that result from record lock
conflicts during read and write operations.
|
class |
LockNotAvailableException
Thrown when a non-blocking operation fails to get a lock.
|
class |
LockNotGrantedException
Deprecated.
replaced by
LockNotAvailableException |
class |
LockTimeoutException
Thrown when multiple threads are competing for a lock and the lock timeout
interval is exceeded for the current operation.
|
class |
LogWriteException
Thrown when an
IOException or other failure occurs when writing to
the JE log. |
class |
OperationFailureException
Indicates that a failure has occurred that impacts the current operation
and/or transaction.
|
class |
RunRecoveryException
Deprecated.
replaced by
EnvironmentFailureException and Environment.isValid(). |
class |
SecondaryConstraintException
Base class for exceptions thrown when a write operation fails because of a
secondary constraint.
|
class |
SecondaryIntegrityException
Thrown when an integrity problem is detected while accessing a secondary
database, including access to secondaries while writing to a primary
database.
|
class |
SecondaryReferenceException
Base class for exceptions thrown when a read or write operation fails
because of a secondary constraint or integrity problem.
|
class |
SequenceExistsException
Thrown by
Database.openSequence if the
sequence record already exists and the SequenceConfig
ExclusiveCreate parameter is true. |
class |
SequenceIntegrityException
Thrown by
Sequence.get if the sequence record has been
deleted. |
class |
SequenceNotFoundException
Thrown by
Database.openSequence if the
sequence record does not exist and the SequenceConfig AllowCreate
parameter is false. |
class |
SequenceOverflowException
Thrown by
Sequence.get if the end of the sequence is
reached and wrapping is not configured. |
class |
ThreadInterruptedException
Thrown when
java.lang.InterruptedException (a thread interrupt) or
java.nio.channels.ClosedChannelException (which also results from a
thread interrupt) occurs in any JE method. |
class |
TransactionTimeoutException
Thrown when the transaction timeout interval is exceeded.
|
class |
UniqueConstraintException
Thrown when an attempt to write a primary database record would insert a
secondary record with a duplicate key, for secondaries that represent
one-to-one and one-to-many relationships.
|
class |
VersionMismatchException
Thrown by the Environment constructor when an environment cannot be
opened because the version of the existing log is not compatible with the
version of JE that is running.
|
class |
XAFailureException
Thrown if an attempt is made to use a
Transaction after it has been
invalidated as the result of an XA failure. |
| Modifier and Type | Method and Description |
|---|---|
void |
Transaction.abort()
Cause an abnormal termination of the transaction.
|
Transaction |
Environment.beginTransaction(Transaction parent,
TransactionConfig txnConfig)
Creates a new transaction in the database environment.
|
void |
Environment.checkpoint(CheckpointConfig ckptConfig)
Synchronously checkpoint the database environment.
|
int |
Environment.cleanLog()
Synchronously invokes log file (data file) cleaning until the target
disk space utilization has been reached; this method is called
periodically by the cleaner background threads.
|
boolean |
Environment.cleanLogFile()
Synchronously invokes cleaning of a single log file (data file), if
the target disk space utilization has not been reached.
|
void |
JoinCursor.close()
Closes the cursors that have been opened by this join cursor.
|
void |
DiskOrderedCursor.close()
Discards the cursor.
|
void |
Sequence.close()
Closes a sequence.
|
void |
Environment.close()
The Environment.close method closes the Berkeley DB environment.
|
void |
Transaction.commit()
End the transaction.
|
void |
Transaction.commit(Durability durability)
End the transaction using the specified durability requirements.
|
void |
Transaction.commitNoSync()
End the transaction, not writing to stable storage and not committing
synchronously.
|
void |
Transaction.commitSync()
End the transaction, writing to stable storage and committing
synchronously.
|
void |
Transaction.commitWriteNoSync()
End the transaction, writing to stable storage but not committing
synchronously.
|
void |
Environment.compress()
Synchronously invokes the compressor mechanism which compacts in memory
data structures after delete operations.
|
void |
Environment.evictMemory()
Synchronously invokes the mechanism for keeping memory usage within the
cache size boundaries.
|
long |
Sequence.get(Transaction txn,
int delta)
Returns the next available element in the sequence and changes the
sequence value by
delta. |
EnvironmentConfig |
Environment.getConfig()
Returns this object's configuration.
|
List<String> |
Environment.getDatabaseNames()
Returns a List of database names for the database environment.
|
static Environment |
DbInternal.getEnvironment(Transaction txn)
Proxy to Transaction.getEnvironment()
|
File |
Environment.getHome()
Returns the database environment's home directory.
|
static Locker |
DbInternal.getLocker(Transaction txn)
Proxy to Transaction.getLocker()
|
LockStats |
Environment.getLockStats(StatsConfig config)
Deprecated.
as of 4.0.10, replaced by
Environment.getStats(StatsConfig). |
EnvironmentMutableConfig |
Environment.getMutableConfig()
Returns database environment attributes.
|
SequenceStats |
Sequence.getStats(StatsConfig config)
Returns statistical information about the sequence.
|
EnvironmentStats |
Environment.getStats(StatsConfig config)
Returns the general database environment statistics.
|
Transaction |
Environment.getThreadTransaction()
Returns the transaction associated with this thread if implied
transactions are being used.
|
TransactionStats |
Environment.getTransactionStats(StatsConfig config)
Returns the database environment's transactional statistics.
|
boolean |
ForeignKeyNullifier.nullifyForeignKey(SecondaryDatabase secondary,
DatabaseEntry data)
Sets the foreign key reference to null in the datum of the primary
database.
|
boolean |
ForeignMultiKeyNullifier.nullifyForeignKey(SecondaryDatabase secondary,
DatabaseEntry key,
DatabaseEntry data,
DatabaseEntry secKey)
Sets the foreign key reference to null in the datum of the primary
database.
|
DiskOrderedCursor |
Environment.openDiskOrderedCursor(Database[] databases,
DiskOrderedCursorConfig config)
Create a DiskOrderedCursor to iterate over the records of a given set
of databases.
|
SecondaryDatabase |
Environment.openSecondaryDatabase(Transaction txn,
String databaseName,
Database primaryDatabase,
SecondaryConfig dbConfig)
Opens and optionally creates a
SecondaryDatabase. |
PreloadStats |
Environment.preload(Database[] databases,
PreloadConfig config)
Preloads the cache with multiple databases.
|
static OperationResult |
DbInternal.retrieveNext(Cursor cursor,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode,
GetMode getMode)
Proxy to Cursor.retrieveNext().
|
void |
Transaction.setLockTimeout(long timeOut)
Deprecated.
as of 4.0, replaced by
Transaction.setLockTimeout(long,
TimeUnit). |
void |
Transaction.setLockTimeout(long timeOut,
TimeUnit unit)
Configures the lock request timeout value for the transaction.
|
void |
Environment.setMutableConfig(EnvironmentMutableConfig mutableConfig)
Sets database environment attributes.
|
void |
Transaction.setTxnTimeout(long timeOut)
Deprecated.
as of 4.0, replaced by
Transaction.setTxnTimeout(long,
TimeUnit). |
void |
Transaction.setTxnTimeout(long timeOut,
TimeUnit unit)
Configures the timeout value for the transaction lifetime.
|
void |
Environment.sync()
Synchronously flushes database environment databases to stable storage.
|
static void |
DbInternal.validate(DatabaseConfig config1,
DatabaseConfig config2)
Proxy to DatabaseConfig.validate(DatabaseConfig()
|
boolean |
Environment.verify(VerifyConfig config,
PrintStream out)
Returns if the database environment is consistent and correct.
|
| Constructor and Description |
|---|
Environment(File envHome,
EnvironmentConfig configuration)
Creates a database environment handle.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
VerifyUtils.checkLsns(Database db)
Compare the LSNs referenced by a given Database to the lsns held
in the utilization profile.
|
long |
UtilizationTracker.evictMemory()
Evicts tracked detail if the budget for the tracker is exceeded.
|
void |
UtilizationProfile.flushFileUtilization(Collection<TrackedFileSummary> activeFiles)
Flush a FileSummaryLN node for each given TrackedFileSummary.
|
void |
UtilizationProfile.flushLocalTracker(LocalUtilizationTracker localTracker)
Count the given locally tracked info as obsolete and then log the file
info.
|
long[] |
UtilizationProfile.getObsoleteDetailSorted(Long fileNum)
Returns the sorted obsolete offsets for the given file.
|
void |
UtilizationProfile.populateCache(StartupTracker.Counter counter,
RecoveryInfo recoveryInfo)
Populate the profile for file selection.
|
void |
ExtinctionScanner.startDbExtinction(DatabaseImpl dbImpl)
Used after transaction commit or non-transactional operation end in
these cases:
purge the deleted database after a commit of
Environment.removeDatabase
purge the deleted database after a commit of
Environment.truncateDatabase
purge the newly created database after an abort of
Environment.truncateDatabase
|
void |
BaseUtilizationTracker.transferToUtilizationTracker(UtilizationTracker tracker)
Transfers counts and offsets from this local tracker to the given
(global) UtilizationTracker.
|
static void |
VerifyUtils.verifyUtilization(EnvironmentImpl envImpl,
boolean expectAccurateObsoleteLNCount,
boolean expectAccurateObsoleteLNSize)
Compare utilization as calculated by UtilizationProfile to utilization
as calculated by UtilizationFileReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
EnvironmentImpl.abnormalClose()
Used by error handling to forcibly close an environment, and by tests to
close an environment to simulate a crash.
|
void |
EnvironmentImpl.checkOpen() |
void |
EnvironmentImpl.close()
Decrements the reference count and closes the environment when it
reaches zero.
|
void |
EnvironmentImpl.close(boolean doCheckpoint)
Decrements the reference count and closes the environment when it
reaches zero.
|
void |
EnvironmentImpl.closeAfterInvalid() |
long |
DatabaseImpl.count(long memoryLimit)
Count entries in the database including dups, but don't dirty the cache.
|
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.
|
DatabaseImpl |
DbTree.createReplicaDb(Locker locker,
String databaseName,
DatabaseConfig dbConfig,
NameLN replicatedLN,
ReplicationContext repContext)
Create a replicated database on this replica node.
|
void |
DbTree.deleteMapLN(DatabaseId id) |
void |
EnvConfigObserver.envConfigUpdate(DbConfigManager configMgr,
EnvironmentMutableConfig newConfig)
Notifies the observer that one or more mutable properties have been
changed.
|
void |
MemoryBudget.envConfigUpdate(DbConfigManager configManager,
EnvironmentMutableConfig ignore)
Respond to config updates.
|
boolean |
EnvironmentImpl.finishInit(EnvironmentConfig envConfig)
Initialize the environment, including running recovery, if it is not
already initialized.
|
long |
EnvironmentImpl.forceLogFileFlip()
Flip the log to a new file, forcing an fsync.
|
byte[] |
DatabaseId.getBytes() |
DatabaseImpl |
DbTree.getDb(DatabaseId dbId)
Get a database object based on an id only.
|
DatabaseImpl |
DbTree.getDb(DatabaseId dbId,
long lockTimeout)
Get a database object based on an id only.
|
DatabaseImpl |
DbTree.getDb(DatabaseId dbId,
long lockTimeout,
Map<DatabaseId,DatabaseImpl> dbCache)
Get a database object based on an id only, caching the id-db mapping in
the given map.
|
DatabaseImpl |
DbTree.getDb(Locker nameLocker,
String databaseName,
HandleLocker handleLocker,
boolean writeLock)
Get a database object given a database name.
|
List<String> |
DbTree.getDbNames() |
Map<DatabaseId,String> |
DbTree.getDbNamesAndIds() |
int |
DbTree.getHighestLevel(DatabaseImpl dbImpl) |
void |
DatabaseImpl.handleClosed(boolean doSyncDw,
boolean deleteTempDb)
Called after a handle onto this DB is closed.
|
EnvironmentStats |
EnvironmentImpl.loadStats(StatsConfig config)
Retrieve and return stat information.
|
EnvironmentStats |
EnvironmentImpl.loadStatsInternal(StatsConfig config)
Retrieve and return stat information.
|
LockStats |
EnvironmentImpl.lockStat(StatsConfig config)
Retrieve lock statistics
|
void |
EnvironmentImpl.logMapTreeRoot()
Logs the map tree root and saves the LSN.
|
void |
EnvironmentImpl.logMapTreeRoot(long ifBeforeLsn)
Logs the map tree root, but only if its current LSN is before the
ifBeforeLsn parameter or ifBeforeLsn is NULL_LSN.
|
void |
DbTree.modifyDbRoot(DatabaseImpl db)
Write the MapLN to disk.
|
void |
DbTree.modifyDbRoot(DatabaseImpl db,
long ifBeforeLsn,
boolean mustExist)
Write a MapLN to the log in order to:
- propagate a root change
- save per-db utilization information
- save database config information.
|
void |
DbTree.optionalModifyDbRoot(DatabaseImpl db)
Check deferred write settings before writing the MapLN.
|
protected void |
EnvironmentImpl.postCheckpointClose(boolean checkpointed)
Release any resources from a subclass that need to be released after
the closing checkpoint.
|
PreloadStats |
EnvironmentImpl.preload(DatabaseImpl[] dbImpls,
PreloadConfig config) |
PreloadStats |
DatabaseImpl.preload(PreloadConfig config)
Preload the cache, using up to maxBytes bytes or maxMillsecs msec.
|
void |
EnvironmentImpl.readMapTreeFromLog(long rootLsn)
Set the mapping tree from the log.
|
void |
DbTree.rebuildINListMapDb()
Rebuild the IN list after recovery.
|
void |
EnvironmentImpl.registerMBean(Environment env)
JE MBean registration is performed during Environment creation so that
the MBean has access to the Environment API which is not available from
EnvironmentImpl.
|
void |
EnvironmentImpl.rewriteMapTreeRoot(long cleanerTargetLsn)
Force a rewrite of the map tree root if required.
|
boolean |
DatabaseImpl.setBtreeComparator(Comparator<byte[]> comparator,
boolean byClassName)
Set the btree comparison function for this database.
|
boolean |
DatabaseImpl.setDuplicateComparator(Comparator<byte[]> comparator,
boolean byClassName)
Set the duplicate comparison function for this database.
|
void |
EnvironmentImpl.setMutableConfig(EnvironmentMutableConfig config)
Changes the mutable config properties that are present in the given
config, and notifies all config observer.
|
protected void |
EnvironmentImpl.setupClose(PrintWriter errors)
Release any resources from a subclass that need to be released before
close is called on regular environment components.
|
BtreeStats |
DatabaseImpl.stat(StatsConfig config) |
void |
DatabaseImpl.sync(boolean flushLog)
Flush all dirty nodes for this database to disk.
|
Txn |
EnvironmentImpl.txnBegin(Transaction parent,
TransactionConfig txnConfig)
Transactional services.
|
void |
EnvironmentImpl.verify(VerifyConfig config) |
BtreeStats |
DatabaseImpl.verify(VerifyConfig config) |
void |
EnvironmentImpl.verifyCursors() |
| Constructor and Description |
|---|
SortedLSNTreeWalker(DatabaseImpl[] dbImpls,
long[] rootLsns,
SortedLSNTreeWalker.TreeNodeProcessor callback,
List<DatabaseException> savedExceptions,
com.sleepycat.je.dbi.SortedLSNTreeWalker.ExceptionPredicate excPredicate) |
| Constructor and Description |
|---|
DatabaseImpl(Locker locker,
String dbName,
DatabaseId id,
EnvironmentImpl envImpl,
DatabaseConfig dbConfig)
Create a database object for a new database.
|
DbTree(EnvironmentImpl env,
boolean replicationIntended,
boolean preserveVLSN)
Create a new dbTree for a new environment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Evictor.doManualEvict() |
void |
Evictor.envConfigUpdate(DbConfigManager configManager,
EnvironmentMutableConfig ignore)
Respond to config updates.
|
| Constructor and Description |
|---|
Evictor(EnvironmentImpl envImpl) |
| Modifier and Type | Method and Description |
|---|---|
void |
INCompressor.doCompress()
The real work to doing a compress.
|
void |
INCompressor.onWakeup() |
void |
INCompressor.verifyCursors() |
| Modifier and Type | Method and Description |
|---|---|
void |
LNFileReader.addTargetType(LogEntryType entryType) |
void |
INFileReader.addTargetType(LogEntryType entryType)
Configure this reader to target this kind of entry.
|
boolean |
FileManager.checkEnvHomePermissions(boolean rdOnly)
Ensure that if the environment home dir is on readonly media or in a
readonly directory that the environment has been opened for readonly
access.
|
void |
FileManager.clear()
Close all file handles and empty the cache.
|
boolean |
FileManager.deleteFile(long fileNum)
Delete log file NNNNNNNN.
|
protected boolean |
FileReader.ReadWindow.fillFromFile(FileHandle fileHandle,
long targetOffset) |
protected boolean |
FileReader.ReadWindow.fillNext(boolean singleFile,
int bytesNeeded)
Fill up the read buffer with more data, moving along to the
following file (next largest number) if needed.
|
void |
LogManager.flushNoSync()
Flush all log entries to the log but do not fsync.
|
void |
LogManager.flushSync()
Flush all log entries to the log and perform an fsync.
|
ByteBuffer |
LogSource.getBytes(long fileOffset)
Fill the destination byte array with bytes.
|
ByteBuffer |
LogSource.getBytes(long fileOffset,
int numBytes)
Fill the destination byte array with the requested number of bytes.
|
Object |
LogManager.getEntry(long lsn)
Fault in the first object in the log entry log entry at this LSN.
|
FileHandle |
FileManager.getFileHandle(long fileNum)
Return a read only file handle that corresponds to this file number.
|
int |
FileManager.getFileLogVersion(long fileNum)
Returns the log version for the given file.
|
IN |
INFileReader.getIN(DatabaseImpl dbImpl)
Get the last IN seen by the reader.
|
LogEntry |
LogManager.getLogEntryHandleNotFound(long lsn) |
LogSource |
LogManager.getLogSource(long lsn)
Find the LSN, whether in a file or still in the log buffers.
|
LogEntry |
LogEntryType.getNewLogEntry() |
WholeEntry |
LogManager.getWholeLogEntryHandleNotFound(long lsn) |
protected boolean |
FileReader.isTargetEntry()
This method is called by readNextEntry() after the header of the current
logrec has been de-serialized, but not the body.
|
protected boolean |
INFileReader.isTargetEntry()
If we're tracking node, database and txn IDs, we want to see all node
log entries.
|
void |
LogBuffer.latchForWrite()
Acquires the readLatch, providing exclusive access to the buffer.
|
StatGroup |
LogManager.loadStats(StatsConfig config) |
long |
LogManager.log(LogEntry entry,
ReplicationContext repContext)
Write a log entry.
|
LogItem |
LogManager.log(LogParams params)
Log an item, first logging any items on the lazyLogQueue, and finally
flushing and sync'ing (if requested).
|
long |
LogManager.logForceFlip(LogEntry entry)
Log this single object and force a flip of the log files.
|
long |
LogManager.logForceFlush(LogEntry entry,
boolean fsyncRequired,
ReplicationContext repContext)
Log this single object and force a write of the log files.
|
protected FileReader.ReadWindow |
FileReader.makeWindow(int readBufferSize)
May be overridden by other FileReaders.
|
protected boolean |
PrintFileReader.processEntry(ByteBuffer entryBuffer)
This reader prints the log entry item.
|
protected boolean |
UtilizationFileReader.processEntry(ByteBuffer entryBuffer) |
protected boolean |
ScavengerFileReader.processEntry(ByteBuffer entryBuffer) |
protected boolean |
CleanerFileReader.processEntry(ByteBuffer entryBuffer)
Process the header to track the last VLSN and count true utilization.
|
protected abstract boolean |
FileReader.processEntry(ByteBuffer entryBuffer)
Each file reader implements this method to process the entry data.
|
protected boolean |
LNFileReader.processEntry(ByteBuffer entryBuffer)
This reader instantiates an LN and key for every LN entry.
|
protected boolean |
SearchFileReader.processEntry(ByteBuffer entryBuffer)
This reader instantiate the first object of a given log entry.
|
protected boolean |
INFileReader.processEntry(ByteBuffer entryBuffer)
This reader returns non-provisional INs and IN delete entries.
|
protected abstract void |
ScavengerFileReader.processEntryCallback(LogEntry entry,
LogEntryType entryType) |
void |
FileHandle.release() |
void |
LogSource.release()
We're done with this log source.
|
void |
FileManager.releaseExclusiveLock() |
boolean |
FileManager.renameFile(long fileNum,
String newSuffix) |
void |
LogManager.resetPool(DbConfigManager configManager)
Reset the pool when the cache is resized.
|
protected boolean |
ScavengerFileReader.resyncReader(long nextGoodRecordPostCorruption,
boolean showCorruptedBounds) |
protected void |
FileReader.setBackwardPosition()
Ensure that the next target is in the window.
|
void |
LastFileReader.setEndOfFile() |
protected void |
FileReader.setForwardPosition()
Ensure that the next target is in the window.
|
void |
FileReader.skipData(int amountToSkip) |
void |
FileReader.ReadWindow.slideAndFill(long windowfileNum,
long windowStartOffset,
long targetOffset,
boolean forward) |
void |
LogManager.transferToUtilizationTracker(LocalUtilizationTracker localTracker) |
void |
FileManager.truncateLog(long fileNum,
long offset) |
void |
FileManager.truncateSingleFile(long fileNum,
long offset)
Truncate a log at this position.
|
| Constructor and Description |
|---|
CheckpointFileReader(EnvironmentImpl env,
int readBufferSize,
boolean forward,
long startLsn,
long finishLsn,
long endOfFileLsn)
Create this reader to start at a given LSN.
|
DumpFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
long finishLsn,
long endOfFileLsn,
String entryTypes,
String dbIds,
String txnIds,
boolean verbose,
boolean repEntriesOnly,
boolean forwards)
Create this reader to start at a given LSN.
|
FileReader(EnvironmentImpl envImpl,
int readBufferSize,
boolean forward,
long startLsn,
Long singleFileNumber,
long endOfFileLsn,
long finishLsn) |
FileReader(EnvironmentImpl envImpl,
int readBufferSize,
boolean forward,
long startLsn,
Long singleFileNumber,
long endOfFileLsn,
long finishLsn,
boolean doChecksumOnRead) |
INFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
long finishLsn,
boolean trackIds,
long partialCkptStart,
long ckptEnd,
RecoveryUtilizationTracker tracker,
Set<DatabaseId> logVersion8UpgradeDbs,
AtomicBoolean logVersion8UpgradeDeltas)
Create with logVersion8UpgradeDbs and logVersion8UpgradeDeltas params.
|
LastFileReader(EnvironmentImpl envImpl,
int readBufferSize)
This file reader is always positioned at the last file.
|
LNFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
boolean redo,
long endOfFileLsn,
long finishLsn,
Long singleFileNum,
long ckptEnd)
Create this reader to start at a given LSN.
|
LogManager(EnvironmentImpl envImpl,
boolean readOnly)
There is a single log manager per database environment.
|
PrintFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
long finishLsn,
long endOfFileLsn,
String entryTypes,
String dbIds,
String txnIds,
boolean verbose,
boolean repEntriesOnly,
boolean forwards)
Create this reader to start at a given LSN.
|
ScavengerFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
long finishLsn,
long endOfFileLsn)
Create this reader to start at a given LSN.
|
SearchFileReader(EnvironmentImpl env,
int readBufferSize,
boolean forward,
long startLsn,
long endOfFileLsn,
LogEntryType targetType)
Create this reader to start at a given LSN.
|
StatsFileReader(EnvironmentImpl envImpl,
int readBufferSize,
long startLsn,
long finishLsn,
long endOfFileLsn,
String entryTypes,
String dbIds,
String txnIds,
boolean verbose,
boolean repEntriesOnly,
boolean forwards)
Create this reader to start at a given LSN.
|
VLSNDistributionReader(EnvironmentImpl envImpl,
int readBufferSize,
long startLsn,
long finishLsn,
long endOfFileLsn,
boolean verbose,
boolean forwards)
Create this reader to start at a given LSN.
|
| Modifier and Type | Method and Description |
|---|---|
IN |
INContainingEntry.getIN(DatabaseImpl dbImpl)
Currently used by recovery only.
|
| Modifier and Type | Method and Description |
|---|---|
RecoveryInfo |
RecoveryManager.recover(boolean readOnly)
Look for an existing log and use it to create an in memory structure for
accessing existing databases.
|
| Constructor and Description |
|---|
RecoveryManager(EnvironmentImpl env)
Make a recovery manager
|
| Modifier and Type | Class and Description |
|---|---|
class |
DatabasePreemptedException
Thrown when attempting to use a Database handle that was forcibly closed by
replication.
|
class |
GroupShutdownException
Thrown when an attempt is made to access an environment that was
shutdown by the Master as a result of a call to
ReplicatedEnvironment.shutdownGroup(long, TimeUnit). |
class |
InsufficientAcksException
This exception is thrown at the time of a commit in a Master, if the Master
could not obtain transaction commit acknowledgments from its Replicas in
accordance with the
Durability.ReplicaAckPolicy currently in effect and within
the requested timeout interval. |
class |
InsufficientLogException
This exception indicates that the log files constituting the Environment are
insufficient and cannot be used as the basis for continuing with the
replication stream provided by the current master.
|
class |
InsufficientReplicasException
Thrown by
Environment.beginTransaction(com.sleepycat.je.Transaction, com.sleepycat.je.TransactionConfig) and Transaction.commit() when these operations are initiated at a Master which is
not in contact with a quorum of Replicas as determined by the Durability.ReplicaAckPolicy that is in effect for the operation. |
class |
LockPreemptedException
Thrown when a lock has been "stolen", or preempted, from a transaction in a
replicated environment.
|
class |
LogOverwriteException
Thrown when one or more log files are modified (overwritten) as the result
of a replication operation.
|
class |
MasterReplicaTransitionException
Deprecated.
as of JE 5.0.88 because the environment no longer needs to
restart when transitioning from master to replica.
|
class |
MasterStateException
This exception indicates that the application attempted an operation that is
not permitted when it is in the
ReplicatedEnvironment.State.MASTER
state. |
class |
MasterTransferFailureException
Thrown by
ReplicatedEnvironment.transferMaster(java.util.Set<java.lang.String>, int, java.util.concurrent.TimeUnit) if a Master Transfer
operation cannot be completed within the allotted time. |
class |
MemberActiveException |
class |
MemberNotFoundException
Thrown when an operation requires a replication group member and that member
is not present in the replication group.
|
class |
ReplicaConsistencyException
This exception is thrown by a Replica to indicate it could not meet the
consistency requirements as defined by the
ReplicaConsistencyPolicy in effect for the transaction, within
the allowed timeout period. |
class |
ReplicaStateException
This exception indicates that the application attempted an operation that is
not permitted when it is in the
ReplicatedEnvironment.State.REPLICA
state. |
class |
ReplicationSecurityException
Exception that is thrown when a security failure has occurred which
may terminate the current replication stream.
|
class |
ReplicaWriteException
This exception indicates that an update operation or transaction commit
or abort was attempted while in the
ReplicatedEnvironment.State.REPLICA state. |
class |
RestartRequiredException
RestartRequiredException serves as the base class for all exceptions which
makes it impossible for HA to proceed without some form of corrective action
on the part of the user, followed by a restart of the application.
|
class |
RollbackException
This asynchronous exception indicates that a new master has been selected,
this
Replica's log is ahead of the current Master,
and in this case, the Replica was unable to rollback without a
recovery. |
class |
RollbackProhibitedException
This exception may be thrown by a Replica during the
replication stream sync-up phase of startup.
|
class |
StateChangeException
Provides a synchronous mechanism for informing an application about a change
in the state of the replication node.
|
class |
UnknownMasterException
Indicates that the underlying operation requires communication with a
Master, but that a Master was not available.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ReplicatedEnvironment.close()
Close this ReplicatedEnvironment and release any resources used by the
handle.
|
static ReplicatedEnvironment |
RepInternal.createDetachedEnv(File envHome,
ReplicationConfig repConfig,
EnvironmentConfig envConfig) |
static ReplicatedEnvironment |
RepInternal.createInternalEnvHandle(File envHome,
ReplicationConfig repConfig,
EnvironmentConfig envConfig) |
ReplicationGroup |
ReplicatedEnvironment.getGroup()
Returns a description of the replication group as known by this node.
|
ReplicationConfig |
ReplicatedEnvironment.getRepConfig()
Return the replication configuration that has been used to create this
handle.
|
ReplicationMutableConfig |
ReplicatedEnvironment.getRepMutableConfig() |
ReplicatedEnvironmentStats |
ReplicatedEnvironment.getRepStats(StatsConfig config)
Returns statistics associated with this environment.
|
ReplicatedEnvironment.State |
ReplicatedEnvironment.getState()
Returns the current state of the node associated with this replication
environment.
|
StateChangeListener |
ReplicatedEnvironment.getStateChangeListener()
Returns the listener used to receive asynchronous replication node state
change events.
|
void |
ReplicatedEnvironment.setRepMutableConfig(ReplicationMutableConfig mutableConfig) |
void |
ReplicatedEnvironment.setStateChangeListener(StateChangeListener listener)
Sets the listener used to receive asynchronous replication node state
change events.
|
| Modifier and Type | Method and Description |
|---|---|
ArbiterStats |
Arbiter.getStats(StatsConfig config)
Gets the Arbiter statistics.
|
void |
Arbiter.setArbiterMutableConfig(ArbiterMutableConfig config)
Sets the Arbiter mutable attributes.
|
void |
Arbiter.shutdown()
Shutdown the Arbiter.
|
| Constructor and Description |
|---|
Arbiter(ArbiterConfig arbiterConfig)
An Arbiter used in elections and transaction acknowledgments.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MonitorEventManager.notifyJoinGroup()
Fire a JoinGroupEvent.
|
void |
MonitorEventManager.notifyLeaveGroup(LeaveGroupEvent.LeaveReason reason)
Fire a LeaveGroupEvent and wait for responses.
|
| Constructor and Description |
|---|
ArbiterImpl(File arbiterHome,
RepImpl repImpl)
The Arbiter implementation.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
RepGroupImpl.NodeConflictException |
| Modifier and Type | Method and Description |
|---|---|
void |
RepImpl.abnormalClose()
Used by error handling to forcibly close an environment, and by tests to
close an environment to simulate a crash.
|
void |
RepGroupDB.addFirstNode()
Ensures that information about this node, the current master, is in the
member database.
|
void |
RepGroupImpl.checkForConflicts(RepNodeImpl node)
Checks for whether a new or changed node definition is in conflict with
other members of the group.
|
DatabaseImpl |
RepImpl.createGroupDb()
Called when a node has identified itself as the master, which is when
the RepNode.selfElect is called.
|
Txn |
RepImpl.createReplayTxn(long txnId)
Create a ReplayTxn for recovery processing.
|
Txn |
RepImpl.createRepUserTxn(TransactionConfig config)
Create an appropriate type of Replicated transaction.
|
void |
PointConsistencyPolicy.ensureConsistency(EnvironmentImpl replicatorImpl)
Ensures that the replica has replayed the replication stream to the
point identified by the commit token.
|
void |
RepGroupDB.ensureMember(Protocol.NodeGroupInfo membershipInfo)
Ensures that the membership info for the replica is in the database.
|
RepGroupImpl |
RepGroupDB.getGroup() |
static RepGroupImpl |
RepGroupDB.getGroup(RepImpl rImpl,
String groupName)
Returns all the members that are currently part of the replication
group, using NO_CONSISTENCY.
|
DatabaseImpl |
RepImpl.getGroupDb()
Open the group db, which should exist already, using NO_CONSISTENCY.
|
ReplicatedEnvironment.State |
RepImpl.joinGroup(ReplicaConsistencyPolicy consistency,
QuorumPolicy initialElectionPolicy)
Wait for this node to join a replication group and return whether it is
a MASTER or REPLICA.
|
protected void |
RepImpl.postCheckpointClose(boolean checkpointed)
Close any resources that need to be closed after the closing checkpoint.
|
void |
RepImpl.preCheckpointEndFlush()
Flush any information that needs to go out at checkpoint.
|
DatabaseImpl |
RepImpl.probeGroupDb()
Open the group db, which should exist already, using NO_CONSISTENCY.
|
void |
RepEnvConfigObserver.repEnvConfigUpdate(RepConfigManager configMgr,
ReplicationMutableConfig newConfig)
Notifies the observer that one or more mutable rep properties have been
changed.
|
void |
RepImpl.repEnvConfigUpdate(RepConfigManager configMgr,
ReplicationMutableConfig newConfig) |
void |
RepGroupDB.setMinJEVersion(JEVersion newMinJEVersion)
Sets the minimum JE version required for nodes to join the replication
group and refreshes the group object cached in the rep group.
|
void |
RepImpl.setRepMutableConfig(ReplicationMutableConfig config) |
protected void |
RepImpl.setupClose(PrintWriter errors) |
void |
RepImpl.txnBeginHook(MasterTxn txn)
Ensure that a sufficient number of feeders are available before
proceeding with a master transaction begin.
|
boolean |
RepGroupDB.updateLocalCBVLSN(NameIdPair nameIdPair,
VLSN newCBVLSN,
NodeType nodeType)
This method is not used when the CBVLSN is defunct -- see GlobalCBVLSN.
|
void |
RepGroupDB.updateMember(RepNodeImpl node,
boolean quorumAck) |
| Constructor and Description |
|---|
RepGroupDB(RepImpl repImpl)
Create an instance.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
NetworkBackup.execute()
Execute the backup.
|
| Constructor and Description |
|---|
LogFileFeeder(FeederManager feederManager,
DataChannel channel) |
NetworkBackup(InetSocketAddress serverSocket,
File envDir,
NameIdPair clientNameId,
boolean retainLogfiles,
FileManager fileManager,
LogManager logManager,
DataChannelFactory channelFactory)
Convenience overloading.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Replay.abortOldTxns()
When mastership changes, all inflight replay transactions are aborted.
|
void |
Replica.ConsistencyTracker.awaitVLSN(long vlsn,
ReplicaConsistencyPolicy consistencyPolicy)
Wait until the log record identified by VLSN has gone by.
|
void |
DurabilityQuorum.ensureReplicasForCommit(MasterTxn txn,
int insufficientReplicasTimeout)
See if there are a sufficient number of replicas alive to support
the commit for this transaction.
|
void |
RepNode.forceMaster(boolean force) |
ReplayTxn |
Replay.getReplayTxn(long txnId,
boolean registerTxnImmediately)
Obtain a ReplayTxn to represent the incoming operation.
|
ReplicatedEnvironment.State |
RepNode.joinGroup(ReplicaConsistencyPolicy consistency,
QuorumPolicy initialElectionPolicy)
JoinGroup ensures that a RepNode is actively participating in a
replication group.
|
void |
Replica.ConsistencyTracker.lagAwait(TimeConsistencyPolicy consistencyPolicy) |
void |
MonitorEventManager.notifyGroupChange(String nodeName,
GroupChangeEvent.GroupChangeType opType)
Fire a GroupChangeEvent.
|
void |
MonitorEventManager.notifyJoinGroup()
Fire a JoinGroupEvent.
|
void |
MonitorEventManager.notifyLeaveGroup(LeaveGroupEvent.LeaveReason reason)
Fire a LeaveGroupEvent and wait for responses.
|
RepGroupImpl |
RepNode.refreshCachedGroup()
This method must be invoked when a RepNode is first initialized and
subsequently every time there is a change to the replication group.
|
void |
Replay.replayEntry(long startNs,
BaseProtocol.Entry entry)
Apply the operation represented by this log entry on this replica node.
|
void |
RepNode.shutdown()
Used to shutdown all activity associated with this replication stream.
|
| Constructor and Description |
|---|
RepNode(RepImpl repImpl,
Replay replay,
NodeState nodeState) |
| Modifier and Type | Method and Description |
|---|---|
ReplicationGroup |
Monitor.getGroup()
Returns the current composition of the group.
|
void |
Monitor.startListener(MonitorChangeListener newListener)
Starts the listener so it's actively listening for election results and
broadcasts of replication group changes.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
ReplicaSyncupReader.SkipGapException |
| Modifier and Type | Method and Description |
|---|---|
String |
OutputWireRecord.dump()
Dump the contents.
|
void |
FeederReplicaSyncup.execute()
The feeder's side of the protocol.
|
Protocol |
FeederReplicaHandshake.execute()
Executes the feeder side of the handshake.
|
void |
ReplicaFeederSyncup.execute(LocalCBVLSNTracker cbvlsnTracker)
The replica's side of the protocol.
|
OutputWireRecord |
ReplicaSyncupReader.findPrevSyncEntry(boolean startAtPrev)
Backward scanning for finding an earlier candidate syncup matchpoint.
|
long |
OutputWireRecord.getCommitTimeStamp()
Returns the timestamp associated with a commit log entry, or 0.
|
long |
OutputWireRecord.getCommitTxnId() |
DatabaseId |
OutputWireRecord.getReplicableDBId()
Returns the ID of the database containing the associated entry if it is
a replicable entry.
|
long |
OutputWireRecord.getTimeStamp() |
OutputWireRecord |
ArbiterFeederSource.getWireRecord(VLSN vlsn,
int waitTime) |
OutputWireRecord |
FeederSource.getWireRecord(VLSN vlsn,
int waitTime)
Must be called to allow deletion of files protected by this feeder.
|
OutputWireRecord |
MasterFeederSource.getWireRecord(VLSN vlsn,
int waitTime) |
ReplicableLogEntry |
OutputWireRecord.instantiateEntry()
Returns a log entry corresponding to the entry buffer.
|
protected boolean |
FeederSyncupReader.isTargetEntry() |
protected boolean |
ReplicaSyncupReader.isTargetEntry()
Return true for ckpt entries, for syncable entries, and if we're in
specific vlsn scan mode, any replicated entry.
|
StatGroup |
ArbiterFeederSource.loadStats(StatsConfig config) |
boolean |
OutputWireRecord.match(InputWireRecord input)
Used at syncup, when comparing records received from the feeder against
local records.
|
boolean |
OutputWireRecord.match(OutputWireRecord otherRecord)
For unit tests.
|
OutputWireRecord |
ReplicaSyncupReader.scanBackwards(VLSN vlsn)
Backward scanning for the replica's part in syncup.
|
| Constructor and Description |
|---|
AlternateMatchpoint(ByteBuffer buffer) |
ArbiterFeederSource(EnvironmentImpl envImpl) |
Commit(ByteBuffer buffer) |
Entry(ByteBuffer buffer) |
FeederSyncupReader(EnvironmentImpl envImpl,
VLSNIndex vlsnIndex,
long endOfLogLsn,
int readBufferSize,
VLSN startVLSN,
long finishLsn) |
MasterFeederSource(RepImpl envImpl,
VLSNIndex vlsnIndex,
NameIdPair replicaNameIdPair,
VLSN startVLSN) |
ReplicaSyncupReader(EnvironmentImpl envImpl,
VLSNIndex vlsnIndex,
long endOfLogLsn,
int readBufferSize,
VLSN startVLSN,
long finishLsn,
MatchpointSearchResults searchResults) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
MasterTxn.propagatePostCommitException(DatabaseException postCommitException) |
| Modifier and Type | Method and Description |
|---|---|
long |
ReplayTxn.abort(ReplicationContext clientRepContext,
int abortMasterNodeId,
long abortDTVLSN) |
void |
ReplayTxn.cleanup()
Invoked when a ReplayTxn is being abandoned on shutdown.
|
void |
ReplayTxn.close(boolean isCommit) |
long |
ReplayTxn.commit(Durability.SyncPolicy syncPolicy,
ReplicationContext clientRepContext,
int commitMasterNodeId,
long commitDTVLSN)
Commits the txn being replayed.
|
LockResult |
MasterTxn.lockInternal(long lsn,
LockType lockType,
boolean noWait,
boolean jumpAheadOfWaiters,
DatabaseImpl database)
Prevent this MasterTxn from taking locks if the node becomes a
replica.
|
LockResult |
ReadonlyTxn.lockInternal(long lsn,
LockType lockType,
boolean noWait,
boolean jumpAheadOfWaiters,
DatabaseImpl database)
Provides a wrapper to screen for write locks.
|
protected void |
MasterTxn.postLogCommitHook(LogItem commitItem) |
protected void |
MasterTxn.preLogAbortHook() |
protected void |
MasterTxn.preLogCommitHook() |
Collection<Long> |
ReplayTxn.rollback(long matchpointLsn)
Rollback all write operations that are logged with an LSN > the
matchpointLsn parameter.
|
protected void |
MasterTxn.txnBeginHook(TransactionConfig config)
Causes the transaction to wait until we have sufficient replicas to
acknowledge the commit.
|
protected void |
ReadonlyTxn.txnBeginHook(TransactionConfig config)
Verifies that consistency requirements are met before allowing the
transaction to proceed.
|
| Constructor and Description |
|---|
MasterTxn(EnvironmentImpl envImpl,
TransactionConfig config,
NameIdPair nameIdPair) |
ReadonlyTxn(EnvironmentImpl envImpl,
TransactionConfig config) |
ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
Logger logger)
Used when creating ReplayTxns at recovery.
|
ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
SimpleTxnMap<ReplayTxn> activeTxns,
Logger logger)
Used when creating ReplayTxns for Replay.
|
| Modifier and Type | Class and Description |
|---|---|
class |
LDiffRecordRequestException
Thrown when LDiff requesting records on remote database fails.
|
| Modifier and Type | Method and Description |
|---|---|
static Block |
LDiffUtil.readBlock(int blockId,
Cursor cursor,
int numKeys) |
| Modifier and Type | Method and Description |
|---|---|
void |
RepUtils.ExceptionAwareCountDownLatch.awaitOrException() |
boolean |
RepUtils.ExceptionAwareCountDownLatch.awaitOrException(long timeout,
TimeUnit unit)
Blocks, waiting for the latch to count down to zero, or until an
Exception is provided. |
T |
RepUtils.ExceptionAwareBlockingQueue.pollOrException(long timeout,
TimeUnit unit) |
| Modifier and Type | Method and Description |
|---|---|
void |
VLSNIndex.close(boolean doFlush) |
VLSNBucket |
VLSNIndex.getGTEBucket(VLSN vlsn,
VLSNBucket currentBucketInUse)
Get the vlsnBucket that owns this VLSN.
|
long |
VLSNIndex.getGTEFileNumber(VLSN vlsn)
The caller must ensure that the requested VLSN is within the VLSNIndex
range; we assume that there is a valid bucket.
|
VLSNBucket |
VLSNIndex.getLTEBucketFromDatabase(VLSN vlsn) |
long |
VLSNIndex.getLTEFileNumber(VLSN vlsn)
Return the nearest file number <= the log file that houses
this VLSN.
|
void |
VLSNIndex.truncateFromTail(VLSN deleteStart,
long lastLsn)
Remove all information from the VLSNIndex for VLSNs >=
deleteStart Used by replica side syncup, when the log is
truncated.
|
boolean |
VLSNIndex.verify(boolean verbose) |
static void |
VLSNIndex.verifyDb(Environment env,
PrintStream out,
boolean verbose)
For DbStreamVerify utility.
|
| Constructor and Description |
|---|
VLSNIndex(EnvironmentImpl envImpl,
String mappingDbName,
NameIdPair nameIdPair,
int vlsnStride,
int vlsnMaxMappings,
int vlsnMaxDistance,
RecoveryInfo recoveryInfo)
The mapping db's name is passed in as a parameter instead of the more
intuitive approach of defining it within the class to facilitate unit
testing of the VLSNIndex.
|
| Modifier and Type | Method and Description |
|---|---|
void |
StatCapture.envConfigUpdate(DbConfigManager configMgr,
EnvironmentMutableConfig unused) |
| Modifier and Type | Method and Description |
|---|---|
IN |
WithRootLatched.doWork(ChildReference root)
doWork is called while the tree's root latch is held.
|
void |
BIN.evictLN(int index,
boolean ifFetchedCold) |
long |
BIN.evictLNs()
Reduce memory consumption by evicting all LN targets.
|
Node |
ChildReference.fetchTarget(DatabaseImpl database,
IN parent)
Fetch the target object that this ChildReference refers to.
|
BIN |
Tree.getFirstNode(CacheMode cacheMode)
Find the leftmost node (IN or BIN) in the tree.
|
BIN |
Tree.getLastNode(CacheMode cacheMode)
Find the rightmost node (IN or BIN) in the tree.
|
BIN |
Tree.getNextBin(BIN bin,
CacheMode cacheMode)
Return a reference to the adjacent BIN.
|
boolean |
Tree.getParentBINForChildLN(TreeLocation location,
byte[] key,
boolean splitsAllowed,
boolean blindDeltaOps,
CacheMode cacheMode)
Return a reference to the parent of this LN.
|
SearchResult |
Tree.getParentINForChildIN(IN child,
boolean useTargetLevel,
boolean doFetch,
CacheMode cacheMode)
Search for the parent P of a given IN C (where C is viewed as a logical
node; not as a java obj).
|
SearchResult |
Tree.getParentINForChildIN(IN child,
boolean useTargetLevel,
boolean doFetch,
CacheMode cacheMode,
List<TrackingInfo> trackingList)
This version of getParentINForChildIN does the same thing as the version
above, but also adds a "trackingList" param.
|
SearchResult |
Tree.getParentINForChildIN(long targetNodeId,
byte[] targetKey,
int targetLevel,
int exclusiveLevel,
boolean requireExactMatch,
boolean doFetch,
CacheMode cacheMode,
List<TrackingInfo> trackingList)
This version of getParentINForChildIN() is the actual implementation
of the previous 2 versions (read the comments there), but it also
implements one additional use cases via the extra "requireExactMatch"
param.
|
BIN |
Tree.getPrevBin(BIN bin,
CacheMode cacheMode)
Return a reference to the previous BIN.
|
IN |
Tree.getResidentRootIN(boolean latched) |
IN |
Tree.getRootIN(CacheMode cacheMode)
Helper to obtain the root IN with shared root latching.
|
IN |
Tree.getRootINLatchedExclusive(CacheMode cacheMode)
Helper to obtain the root IN with exclusive root latching.
|
boolean |
IN.insertEntry(Node child,
byte[] key,
long childLsn)
Inserts a slot with the given key, lsn and child node into this IN, if
a slot with the same key does not exist already.
|
void |
Tree.latchRootLatchExclusive() |
void |
Node.latchShared() |
void |
Node.latchShared(CacheMode ignore) |
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.
|
void |
BIN.logDirtyChildren() |
void |
IN.logDirtyChildren()
When splits and checkpoints intermingle in a deferred write databases,
a checkpoint target may appear which has a valid target but a null LSN.
|
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.
|
void |
FileSummaryLN.postFetchInit(DatabaseImpl db,
long sourceLsn)
Initialize a node that has been faulted in from the log.
|
void |
Node.postFetchInit(DatabaseImpl db,
long sourceLsn)
Initialize a node that has been faulted in from the log.
|
void |
Tree.rebuildINList()
rebuildINList is used by recovery to add all the resident nodes to the
IN list.
|
void |
Tree.releaseRootLatch() |
void |
Tree.validateINList(IN parent)
Debugging check that all resident nodes are on the INList and no stray
nodes are present in the unused portion of the IN arrays.
|
IN |
Tree.withRootLatchedExclusive(WithRootLatched wrl) |
IN |
Tree.withRootLatchedShared(WithRootLatched wrl) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
Txn.propagatePostCommitException(DatabaseException postCommitException)
Identifies exceptions that may be propagated back to the caller during
the postCommit phase of a transaction commit.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Txn.abort()
Abort this transaction.
|
long |
Txn.abort(boolean forceFlush)
Abort this transaction.
|
void |
Txn.abort(Xid xid) |
protected abstract void |
Locker.addLock(Long lsn,
LockType type,
LockGrantType grantStatus)
Add a lock to set owned by this transaction.
|
protected void |
Txn.checkIfFrozen(boolean isCommit)
Txn freezing is used to prevent changes to transaction lock contents.
|
void |
Txn.checkState(boolean calledByAbort)
Throw an exception if the transaction is not open.
|
protected abstract void |
Locker.checkState(boolean ignoreCalledByAbort) |
protected void |
Txn.cleanupDatabaseImpls(boolean isCommit)
Cleanup leftover databaseImpls that are a by-product of database
operations like removeDatabase, truncateDatabase and renameDatabase.
|
protected int |
Txn.clearReadLocks() |
protected void |
Txn.clearWriteLocks(Set<Long> retainedNodes)
Release any write locks that are not in the retainedNodes set.
|
StatGroup |
BasicLocker.collectStats()
Stats.
|
abstract StatGroup |
Locker.collectStats()
Get lock count, for per transaction lock stats, for internal debugging.
|
long |
Txn.commit()
Call commit() with the default sync configuration property.
|
long |
Txn.commit(Durability durability)
Commit this transaction; it involves the following logical steps:
1.
|
void |
Txn.commit(Xid xid) |
static Txn |
Txn.createAutoTxn(EnvironmentImpl envImpl,
TransactionConfig config,
ReplicationContext repContext) |
static BasicLocker |
BasicLocker.createBasicLocker(EnvironmentImpl env) |
static BasicLocker |
BasicLocker.createBasicLocker(EnvironmentImpl env,
boolean noWait) |
static BuddyLocker |
BuddyLocker.createBuddyLocker(EnvironmentImpl env,
Locker buddy) |
static HandleLocker |
HandleLocker.createHandleLocker(EnvironmentImpl env,
Locker buddy) |
static PreparedTxn |
PreparedTxn.createPreparedTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long mandatedId) |
static ReadCommittedLocker |
ReadCommittedLocker.createReadCommittedLocker(EnvironmentImpl env,
Locker buddy) |
static ThreadLocker |
ThreadLocker.createThreadLocker(EnvironmentImpl env,
boolean replicated) |
void |
Locker.demoteLock(long lsn)
Revert this lock from a write lock to a read lock.
|
void |
LockManager.dump()
Debugging
|
void |
Locker.dumpLockTable()
Dump lock table, for debugging
|
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) |
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'.
|
protected LockResult |
Txn.lockInternal(long lsn,
LockType lockType,
boolean noWait,
boolean jumpAheadOfWaiters,
DatabaseImpl database)
Gets a lock on this LSN and, if it is a write lock, saves an abort
LSN.
|
protected LockResult |
BasicLocker.lockInternal(long lsn,
LockType lockType,
boolean noWait,
boolean jumpAheadOfWaiters,
DatabaseImpl database) |
protected LockResult |
ReadCommittedLocker.lockInternal(long lsn,
LockType lockType,
boolean noWait,
boolean jumpAheadOfWaiters,
DatabaseImpl database)
Forwards write locks to the buddy locker (the transaction locker).
|
LockStats |
TxnManager.lockStat(StatsConfig config)
Collect lock related stats.
|
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.
|
void |
BasicLocker.nonTxnOperationEnd()
Release locks and close the cursor at the end of the operation.
|
abstract void |
Locker.nonTxnOperationEnd()
Releases locks and closes the locker at the end of a non-transactional
cursor operation.
|
void |
Locker.operationEnd()
The equivalent of calling operationEnd(true).
|
void |
Txn.operationEnd(boolean operationOK) |
void |
BasicLocker.operationEnd(boolean operationOK)
Release locks and close the cursor at the end of the operation.
|
abstract void |
Locker.operationEnd(boolean operationOK)
Different types of transactions do different things when the operation
ends.
|
void |
Locker.operationEnd(OperationStatus status)
A SUCCESS status equals operationOk.
|
protected void |
Txn.postLogCommitHook(LogItem commitItem)
This hook is invoked after the commit record has been written to the
log, but before write locks have been released, so that other
application cannot see the changes made by the transaction.
|
protected void |
Txn.preLogAbortHook() |
protected void |
Txn.preLogCommitHook()
This hook is invoked before the commit of a transaction that made
changes to a replicated environment.
|
int |
Txn.prepare(Xid xid) |
boolean |
LockManager.release(long lsn,
Locker locker)
Release a lock and possibly notify any waiters that they have been
granted the lock.
|
boolean |
Locker.releaseLock(long lsn)
Release the lock on this LN and remove from the transaction's owning
set.
|
boolean |
ReadCommittedLocker.releaseLock(long lsn)
Releases the lock from this locker, or if not owned by this locker then
releases it from the buddy locker.
|
void |
BuddyLocker.releaseNonTxnLocks()
Forwards this call to the base class and to the buddy locker.
|
void |
BasicLocker.releaseNonTxnLocks()
Releases all locks, since all locks held by this locker are
non-transactional.
|
abstract void |
Locker.releaseNonTxnLocks()
Releases any non-transactional locks held by this locker.
|
protected void |
Txn.releaseWriteLocks()
Releases all write locks, nulls the lock collection.
|
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) |
Txn |
TxnManager.txnBegin(Transaction parent,
TransactionConfig txnConfig)
Create a new transaction.
|
protected void |
Txn.txnBeginHook(TransactionConfig config)
A replicated environment introduces some new considerations when
entering a transaction scope via an Environment.transactionBegin()
operation.
|
protected void |
Txn.undo()
Undo write operations and release all resources held by the transaction.
|
| Constructor and Description |
|---|
Txn(EnvironmentImpl envImpl,
TransactionConfig config,
ReplicationContext repContext,
long mandatedId)
A non-zero mandatedId is specified only by subtypes which arbitrarily
impose a transaction id value onto the transaction.
|
TxnChain(long lastLoggedLsn,
long txnId,
long matchpoint,
Map<DatabaseId,DatabaseImpl> undoDatabases,
EnvironmentImpl envImpl) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
DbLoad.load() |
static void |
DbVerify.main(String[] argv)
The main used by the DbVerify utility.
|
static void |
DbStat.main(String[] argv) |
void |
DbSpace.print(PrintStream out)
Calculates utilization and prints a report to the given output stream.
|
void |
DbBackup.startBackup()
Start backup mode in order to determine the definitive backup set needed
at this point in time.
|
boolean |
DbVerify.verify(PrintStream out)
Deprecated.
as of 7.5, use
Environment.verify(com.sleepycat.je.VerifyConfig, java.io.PrintStream) or
Database.verify(com.sleepycat.je.VerifyConfig) instead. These methods allow
specifying all VerifyConfig properties. |
| Constructor and Description |
|---|
DbBackup(Environment env)
Creates a DbBackup helper for a full backup.
|
| Modifier and Type | Method and Description |
|---|---|
void |
BtreeVerifier.verifyAll()
Verifies all databases in the environment, including idDatabase and
nameDatabase.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
DaemonThread.onWakeup()
onWakeup is synchronized to ensure that multiple invocations of the
DaemonThread aren't made.
|
| Modifier and Type | Class and Description |
|---|---|
class |
IndexNotAvailableException
Thrown by the
getPrimaryIndex, getSecondaryIndex and getSubclassIndex when an index has not yet
been created. |
class |
StoreExistsException
Thrown by the
EntityStore constructor when the ExclusiveCreate configuration parameter is
true and the store's internal catalog database already exists. |
class |
StoreNotFoundException
Thrown by the
EntityStore constructor when the AllowCreate configuration parameter is false and
the store's internal catalog database does not exist. |
| Modifier and Type | Method and Description |
|---|---|
void |
EntityStore.close()
Closes all databases and sequences that were opened via this store.
|
void |
EntityCursor.close()
Closes the cursor.
|
void |
ForwardCursor.close()
Closes the cursor.
|
void |
EntityStore.closeClass(Class entityClass)
Closes the primary and secondary databases for the given entity class
that were opened via this store.
|
boolean |
EntityIndex.contains(K key)
Checks for existence of a key in this index.
|
boolean |
EntityIndex.contains(Transaction txn,
K key,
LockMode lockMode)
Checks for existence of a key in this index.
|
long |
EntityIndex.count()
Returns a non-transactional count of the entities in this index.
|
int |
EntityCursor.count()
Returns the number of values (duplicates) for the key at the cursor
position, or returns zero if all values for the key have been deleted.
|
long |
EntityIndex.count(long memoryLimit)
Returns a non-transactional count of the entities in this index.
|
long |
EntityCursor.countEstimate()
Returns a rough estimate of the number of values (duplicates) for the
key at the cursor position, or returns zero if all values for the key
have been deleted.
|
V |
EntityCursor.current()
Returns the value at the cursor position, or null if the value at the
cursor position has been deleted.
|
V |
EntityCursor.current(LockMode lockMode)
Returns the value at the cursor position, or null if the value at the
cursor position has been deleted.
|
boolean |
EntityCursor.delete()
Deletes the entity at the cursor position.
|
boolean |
EntityIndex.delete(K key)
Deletes all entities with a given index key.
|
boolean |
EntityIndex.delete(Transaction txn,
K key)
Deletes all entities with a given index key.
|
OperationResult |
EntityIndex.delete(Transaction txn,
K key,
WriteOptions options)
Deletes all entities with a given index key, using a WriteOptions
parameter and returning an OperationResult.
|
OperationResult |
EntityCursor.delete(WriteOptions options)
Deletes the entity at the cursor position, using a WriteOptions
parameter and returning an OperationResult.
|
EntityCursor<V> |
EntityCursor.dup()
Duplicates the cursor at the cursor position.
|
EntityCursor<V> |
EntityIndex.entities()
Opens a cursor for traversing all entities in this index.
|
ForwardCursor<E> |
EntityJoin.entities()
Opens a cursor that returns the entities qualifying for the join.
|
EntityCursor<V> |
EntityIndex.entities(K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive)
Opens a cursor for traversing entities in a key range.
|
EntityCursor<V> |
EntityIndex.entities(Transaction txn,
CursorConfig config)
Opens a cursor for traversing all entities in this index.
|
ForwardCursor<E> |
EntityJoin.entities(Transaction txn,
CursorConfig config)
Opens a cursor that returns the entities qualifying for the join.
|
EntityCursor<V> |
EntityIndex.entities(Transaction txn,
K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive,
CursorConfig config)
Opens a cursor for traversing entities in a key range.
|
EvolveStats |
EntityStore.evolve(EvolveConfig config)
Performs conversion of unevolved objects in order to reduce lazy
conversion overhead.
|
V |
EntityCursor.first()
Moves the cursor to the first value and returns it, or returns null if
the cursor range is empty.
|
V |
EntityCursor.first(LockMode lockMode)
Moves the cursor to the first value and returns it, or returns null if
the cursor range is empty.
|
EntityResult<V> |
EntityCursor.get(Get getType,
ReadOptions options)
Moves the cursor according to the specified
Get type and returns
the value at the updated position. |
V |
EntityIndex.get(K key)
Gets an entity via a key of this index.
|
E |
PrimaryIndex.get(PK key) |
E |
SecondaryIndex.get(SK key) |
EntityResult<V> |
EntityIndex.get(Transaction txn,
K key,
Get getType,
ReadOptions options)
Gets an entity via a key of this index, using Get type and ReadOptions
parameters, and returning an EntityResult.
|
V |
EntityIndex.get(Transaction txn,
K key,
LockMode lockMode)
Gets an entity via a key of this index.
|
EntityResult<E> |
PrimaryIndex.get(Transaction txn,
PK key,
Get getType,
ReadOptions options) |
E |
PrimaryIndex.get(Transaction txn,
PK key,
LockMode lockMode) |
EntityResult<E> |
SecondaryIndex.get(Transaction txn,
SK key,
Get getType,
ReadOptions options) |
E |
SecondaryIndex.get(Transaction txn,
SK key,
LockMode lockMode) |
<PK,E> PrimaryIndex<PK,E> |
EntityStore.getPrimaryIndex(Class<PK> primaryKeyClass,
Class<E> entityClass)
Returns the primary index for a given entity class, opening it if
necessary.
|
<SK,PK,E> SecondaryIndex<SK,PK,E> |
EntityStore.getSecondaryIndex(PrimaryIndex<PK,E> primaryIndex,
Class<SK> keyClass,
String keyName)
Returns a secondary index for a given primary index and secondary key,
opening it if necessary.
|
Sequence |
EntityStore.getSequence(String name)
Returns a named sequence for using Berkeley DB engine API directly,
opening it if necessary.
|
static Set<String> |
EntityStore.getStoreNames(Environment env)
Returns the names of all entity stores in the given environment.
|
<SK,PK,E1,E2 extends E1> |
EntityStore.getSubclassIndex(PrimaryIndex<PK,E1> primaryIndex,
Class<E2> entitySubclass,
Class<SK> keyClass,
String keyName)
Returns a secondary index for a secondary key in an entity subclass,
opening it if necessary.
|
EntityCursor<K> |
EntityIndex.keys()
Opens a cursor for traversing all keys in this index.
|
ForwardCursor<PK> |
EntityJoin.keys()
Opens a cursor that returns the primary keys of entities qualifying for
the join.
|
EntityCursor<K> |
EntityIndex.keys(K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive)
Opens a cursor for traversing keys in a key range.
|
EntityCursor<K> |
EntityIndex.keys(Transaction txn,
CursorConfig config)
Opens a cursor for traversing all keys in this index.
|
ForwardCursor<PK> |
EntityJoin.keys(Transaction txn,
CursorConfig config)
Opens a cursor that returns the primary keys of entities qualifying for
the join.
|
EntityCursor<K> |
EntityIndex.keys(Transaction txn,
K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive,
CursorConfig config)
Opens a cursor for traversing keys in a key range.
|
EntityIndex<SK,PK> |
SecondaryIndex.keysIndex()
Returns a read-only keys index that maps secondary key to primary key.
|
V |
EntityCursor.last()
Moves the cursor to the last value and returns it, or returns null if
the cursor range is empty.
|
V |
EntityCursor.last(LockMode lockMode)
Moves the cursor to the last value and returns it, or returns null if
the cursor range is empty.
|
V |
EntityCursor.next()
Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range.
|
V |
ForwardCursor.next()
Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range.
|
V |
EntityCursor.next(LockMode lockMode)
Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range.
|
V |
ForwardCursor.next(LockMode lockMode)
Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range.
|
V |
EntityCursor.nextDup()
Moves the cursor to the next value with the same key (duplicate) and
returns it, or returns null if no more values are present for the key at
the current position.
|
V |
EntityCursor.nextDup(LockMode lockMode)
Moves the cursor to the next value with the same key (duplicate) and
returns it, or returns null if no more values are present for the key at
the current position.
|
V |
EntityCursor.nextNoDup()
Moves the cursor to the next value with a different key and returns it,
or returns null if there are no more unique keys in the cursor range.
|
V |
EntityCursor.nextNoDup(LockMode lockMode)
Moves the cursor to the next value with a different key and returns it,
or returns null if there are no more unique keys in the cursor range.
|
V |
EntityCursor.prev()
Moves the cursor to the previous value and returns it, or returns null
if there are no preceding values in the cursor range.
|
V |
EntityCursor.prev(LockMode lockMode)
Moves the cursor to the previous value and returns it, or returns null
if there are no preceding values in the cursor range.
|
V |
EntityCursor.prevDup()
Moves the cursor to the previous value with the same key (duplicate) and
returns it, or returns null if no preceding values are present for the
key at the current position.
|
V |
EntityCursor.prevDup(LockMode lockMode)
Moves the cursor to the previous value with the same key (duplicate) and
returns it, or returns null if no preceding values are present for the
key at the current position.
|
V |
EntityCursor.prevNoDup()
Moves the cursor to the preceding value with a different key and returns
it, or returns null if there are no preceding unique keys in the cursor
range.
|
V |
EntityCursor.prevNoDup(LockMode lockMode)
Moves the cursor to the preceding value with a different key and returns
it, or returns null if there are no preceding unique keys in the cursor
range.
|
E |
PrimaryIndex.put(E entity)
Inserts an entity and returns null, or updates it if the primary key
already exists and returns the existing entity.
|
E |
PrimaryIndex.put(Transaction txn,
E entity)
Inserts an entity and returns null, or updates it if the primary key
already exists and returns the existing entity.
|
boolean |
PrimaryIndex.putNoOverwrite(E entity)
Inserts an entity and returns true, or returns false if the primary key
already exists.
|
boolean |
PrimaryIndex.putNoOverwrite(Transaction txn,
E entity)
Inserts an entity and returns true, or returns false if the primary key
already exists.
|
void |
PrimaryIndex.putNoReturn(E entity)
Inserts an entity, or updates it if the primary key already exists (does
not return the existing entity).
|
void |
PrimaryIndex.putNoReturn(Transaction txn,
E entity)
Inserts an entity, or updates it if the primary key already exists (does
not return the existing entity).
|
EntityIndex<PK,E> |
SecondaryIndex.subIndex(SK key)
Returns an index that maps primary key to entity for the subset of
entities having a given secondary key (duplicates).
|
void |
EntityStore.sync()
Flushes each modified index to disk that was opened in deferred-write
mode.
|
void |
EntityStore.truncateClass(Class entityClass)
Deletes all instances of this entity class and its (non-entity)
subclasses.
|
void |
EntityStore.truncateClass(Transaction txn,
Class entityClass)
Deletes all instances of this entity class and its (non-entity)
subclasses.
|
boolean |
EntityCursor.update(V entity)
Replaces the entity at the cursor position with the given entity.
|
OperationResult |
EntityCursor.update(V entity,
WriteOptions options)
Replaces the entity at the cursor position with the given entity,
using a WriteOptions parameter and returning an OperationResult.
|
| Constructor and Description |
|---|
EntityStore(Environment env,
String storeName,
StoreConfig config)
Opens an entity store in a given environment.
|
PrimaryIndex(Database database,
Class<PK> keyClass,
EntryBinding<PK> keyBinding,
Class<E> entityClass,
EntityBinding<E> entityBinding)
Creates a primary index without using an
EntityStore. |
SecondaryIndex(SecondaryDatabase database,
Database keysDatabase,
PrimaryIndex<PK,E> primaryIndex,
Class<SK> secondaryKeyClass,
EntryBinding<SK> secondaryKeyBinding)
Creates a secondary index without using an
EntityStore. |
| Modifier and Type | Class and Description |
|---|---|
class |
DeletedClassException
While reading from an index, an instance of a deleted class version was
encountered.
|
class |
IncompatibleClassException
A class has been changed incompatibly and no mutation has been configured to
handle the change or a new class version number has not been assigned.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
PersistKeyAssigner.assignPrimaryKey(Object entity,
DatabaseEntry key) |
boolean |
PersistCatalog.close()
Decrements the reference count and closes the catalog DB when it reaches
zero.
|
void |
Store.close() |
void |
Store.closeClass(Class entityClass) |
EvolveStats |
Store.evolve(EvolveConfig config) |
void |
PersistCatalog.flush(Transaction txn)
Used to write the catalog when a format has been changed, for example,
when Store.evolve has updated a Format's EvolveNeeded property.
|
<PK,E> PrimaryIndex<PK,E> |
Store.getPrimaryIndex(Class<PK> primaryKeyClass,
String primaryKeyClassName,
Class<E> entityClass,
String entityClassName)
A getPrimaryIndex with extra parameters for opening a raw store.
|
<SK,PK,E1,E2 extends E1> |
Store.getSecondaryIndex(PrimaryIndex<PK,E1> primaryIndex,
Class<E2> entityClass,
String entityClassName,
Class<SK> keyClass,
String keyClassName,
String keyName)
A getSecondaryIndex with extra parameters for opening a raw store.
|
Sequence |
Store.getSequence(String name) |
static Set<String> |
Store.getStoreNames(Environment env) |
void |
Store.sync() |
void |
Store.truncateClass(Class entityClass) |
void |
Store.truncateClass(Transaction txn,
Class entityClass) |
| Constructor and Description |
|---|
PersistCatalog(Environment env,
String storePrefix,
String dbName,
DatabaseConfig dbConfig,
EntityModel modelParam,
Mutations mutationsParam,
boolean rawAccess,
Store store)
Creates a new catalog, opening the database and reading it from a given
catalog database if it already exists.
|
Store(Environment env,
String storeName,
StoreConfig config,
boolean rawAccess) |
| Modifier and Type | Method and Description |
|---|---|
void |
RawStore.close()
Closes all databases and sequences that were opened by this model.
|
PrimaryIndex<Object,RawObject> |
RawStore.getPrimaryIndex(String entityClass)
Opens the primary index for a given entity class.
|
SecondaryIndex<Object,Object,RawObject> |
RawStore.getSecondaryIndex(String entityClass,
String keyName)
Opens the secondary index for a given entity class and secondary key
name.
|
| Constructor and Description |
|---|
RawStore(Environment env,
String storeName,
StoreConfig config)
Opens an entity store for raw data access.
|
Copyright © 2024. All rights reserved.