Class AbstractPersistenceManager.AbstractPersistentStore
- All Implemented Interfaces:
com.oracle.coherence.persistence.PersistentStore<ReadBuffer>
- Enclosing class:
AbstractPersistenceManager<PS extends AbstractPersistenceManager.AbstractPersistentStore>
- Author:
- jh 2012.10.04
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classRunnable implementation that is used to perform and commit a sequence of mutating persistent store operations asynchronously.protected classA Task implementation that deletes an extent from the associated store.protected classAn OpenTask opens the store (parent of this inner class) with the provided store and notifies the Collector when complete.Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriterNested classes/interfaces inherited from interface com.oracle.coherence.persistence.PersistentStore
com.oracle.coherence.persistence.PersistentStore.Visitor<R> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FileThe directory used to store persisted data.protected final FileThe file used to prevent concurrent access to the data directory underlying this persistent store.protected final ReadWriteLockThe ReadWriteLock used to protect against concurrent read/write operations.The set of extent identifiers that are in the process of being deleted.The set of valid extent identifiers known to this persistent store.protected final StringThe identifier of this persistent store.protected FileLockThe FileLock used to prevent concurrent access to the data directory underlying this persistent store.protected intThe state of the PersistenceStore. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new AbstractPersistentStore with the given identifier. -
Method Summary
Modifier and TypeMethodDescriptionvoidAbort an atomic sequence of mutating operations.protected abstract voidabortInternal(Object oToken) Abort an atomic sequence of mutating operations.begin()Begin a new sequence of mutating operations that should be committed to the store as an atomic unit.Begin a new sequence of mutating operations that should be committed to the store asynchronously as an atomic unit.protected abstract ObjectBegin a sequence of mutating operations that should be committed atomically and return a token that represents the atomic unit.voidCommit a sequence of mutating operations represented by the given token as an atomic unit.protected abstract voidcommitInternal(Object oToken) Commit a sequence of mutating operations represented by the given token as an atomic unit.booleancontainsExtent(long lExtentId) Return true if the specified extend identifer exist.protected voidcopyAndOpenInternal(com.oracle.coherence.persistence.PersistentStore<ReadBuffer> storeFrom) Copy the provided store to ensure both the contents are available in the new store and it is open thus ready to receive requests.voidCopy the store to trash if the meta.properties file exist.protected abstract voidcreateExtentInternal(long lExtentId) Create the extent with the given identifier in the persistent store.protected booleandelete(boolean fSafe) Release any resources held by this persistent store and delete any underlying persistent storage.voiddeleteExtent(long lExtentId) Delete the specified extent from the persistent store, ensuring that any key-value mappings associated with the extent are no longer valid.protected abstract voiddeleteExtentInternal(long lExtentId) Delete the specified extent from the persistent store.protected abstract booleanRemove the underlying persistent storage.booleanensureExtent(long lExtentId) Ensure that an extent with the given identifier exists in the persistent store, returning true iff the extent was created.protected booleanensureExtentInternal(long lExtentId) Ensure the provided extent id has been registered and created, thus allowing subsequent load and store operations against the same extent id.protected com.oracle.coherence.persistence.PersistenceExceptionensurePersistenceException(Throwable eCause) Return a PersistenceException with the given cause.protected com.oracle.coherence.persistence.PersistenceExceptionensurePersistenceException(Throwable eCause, String sMessage) Return a PersistenceException with the given cause and detail message.protected voidBlock the calling thread until the store is either ready to accept requests or the store has been closed.voiderase(long lExtentId, ReadBuffer bufKey, Object oToken) Remove the specified key from the underlying store if present.protected abstract voideraseInternal(long lExtentId, ReadBuffer bufKey, Object oToken) Remove the specified key from the underlying persistent storage if present.Suggest to this PersistentStore that the caller requires exclusive access to this store untilcloseis called on the returnedAutoCloseable.long[]extents()Return a list of the extent identifiers in the underlying store.The directory used to store persisted data.getId()Return the identifier of this store.protected AutoCloseableReturn anAutoCloseablethat will transition this PersistentStore out of exclusive mode.protected booleanisClosed()Return true if the store has been closed.protected booleanReturn true if this store is in exclusive mode.booleanisOpen()Return true if the store is open.protected booleanisReady()Return true if the store is ready to accept requests.voiditerate(com.oracle.coherence.persistence.PersistentStore.Visitor<ReadBuffer> visitor) Iterate the key-value pairs in the persistent store, applying the specified visitor to each key-value pair.protected abstract voiditerateInternal(com.oracle.coherence.persistence.PersistentStore.Visitor<ReadBuffer> visitor) Iterate the key-value pairs in the underlying persistent storage, applying the specified visitor to each key-value pair.load(long lExtentId, ReadBuffer bufKey) Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.protected abstract voidloadExtentIdsInternal(Set<Long> setIds) Populate the given set with the identifiers of extents in the underlying persistent storage.protected abstract ReadBufferloadInternal(long lExtentId, ReadBuffer bufKey) Load and return the value associated with the specified key from the underlying persistent storage.protected final voidlockRead()Acquire a read lock on this persistent store.protected final booleanAcquire an exclusive lock on the data directory underlying this persistent store.protected final voidAcquire a write lock on this persistent store.voidmoveExtent(long lOldExtentId, long lNewExtentId) Move the specified extent from the old extent id to the new extent id.protected voidmoveExtentInternal(long lOldExtentId, long lNewExtentId) Move the specified extent from the old extent id to the new extent id.protected booleanopen(com.oracle.coherence.persistence.PersistentStore<ReadBuffer> storeFrom) Open this persistent store.protected abstract voidOpen the underlying persistent storage.protected voidrelease()Release any resources held by this persistent store.protected abstract voidRelease the underlying persistent storage.protected voidsetState(int nState) Set the state of this store.voidstore(long lExtentId, ReadBuffer bufKey, ReadBuffer bufValue, Object oToken) Store the specified value under the specific key in the underlying store.protected abstract voidstoreInternal(long lExtentId, ReadBuffer bufKey, ReadBuffer bufValue, Object oToken) Store the specified value under the specific key in the underlying persistent storage.protected voidsubmitOpen(com.oracle.coherence.persistence.PersistentStore<ReadBuffer> storeFrom, Collector<Object> collector) Open this store either asynchronously, iff both a store to open from and a collector have been provided, or synchronously.toString()Return a human readable description of this AbstractPersistentStore.voidtruncateExtent(long lExtentId) Truncate the specified extent from the persistent store, ensuring that any key-value mappings associated with the extent are removed.protected abstract voidtruncateExtentInternal(long lExtentId) Truncate the specified extent from the persistent store.protected final voidRelease a read lock on this persistent store.protected final voidRelease an exclusive lock on the data directory underlying this persistent store.protected final voidRelease a write lock on this persistent store.protected booleanvalidateExtentId(long lExtentId) Validate the given extent identifier.protected voidValidate the metadataMethods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, newHashMap, newHashMap, newHashSet, newHashSet, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
Field Details
-
f_sId
The identifier of this persistent store. -
f_dirStore
The directory used to store persisted data. -
f_fileLock
The file used to prevent concurrent access to the data directory underlying this persistent store. -
m_nState
protected volatile int m_nStateThe state of the PersistenceStore. -
m_lockFile
The FileLock used to prevent concurrent access to the data directory underlying this persistent store. -
f_lock
The ReadWriteLock used to protect against concurrent read/write operations. -
f_setExtentIds
The set of valid extent identifiers known to this persistent store. -
f_setDeletedIds
The set of extent identifiers that are in the process of being deleted.
-
-
Constructor Details
-
AbstractPersistentStore
Create a new AbstractPersistentStore with the given identifier.- Parameters:
sId- the identifier for the new store- Throws:
IllegalArgumentException- if the identifier is invalid
-
-
Method Details
-
getId
Return the identifier of this store.- Specified by:
getIdin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Returns:
- the identifier that was used to open this store
-
isOpen
public boolean isOpen()Return true if the store is open.- Specified by:
isOpenin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Returns:
- true if the store is open
-
ensureExtent
public boolean ensureExtent(long lExtentId) Ensure that an extent with the given identifier exists in the persistent store, returning true iff the extent was created.- Specified by:
ensureExtentin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lExtentId- the identifier of the extent to ensure- Returns:
- true iff the specified extent did not previously exist
-
deleteExtent
public void deleteExtent(long lExtentId) Delete the specified extent from the persistent store, ensuring that any key-value mappings associated with the extent are no longer valid.Removal of the key-value mappings associated with the extent from the underlying storage is the responsibility of the implementation, and may (for example) be performed immediately, asynchronously, or deferred until space is required.
- Specified by:
deleteExtentin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lExtentId- the identifier of the extent to delete
-
moveExtent
public void moveExtent(long lOldExtentId, long lNewExtentId) Move the specified extent from the old extent id to the new extent id.Upon control being returned the implementation guarantees that any data data that used to reside against the old extent id is accessible from new extent id using the
loadAPI. In addition, calls tostoreare permitted immediately after control is returned.- Specified by:
moveExtentin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lOldExtentId- the old extent identifierlNewExtentId- the new extent identifier
-
truncateExtent
public void truncateExtent(long lExtentId) Truncate the specified extent from the persistent store, ensuring that any key-value mappings associated with the extent are removed.Removal of the key-value mappings associated with the extent from the underlying storage is the responsibility of the implementation, and may (for example) be performed immediately, asynchronously, or deferred until space is required.
- Specified by:
truncateExtentin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lExtentId- the identifier of the extent to truncate
-
extents
public long[] extents()Return a list of the extent identifiers in the underlying store.- Specified by:
extentsin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Returns:
- a list of the extent identifiers in the underlying store
-
exclusively
Description copied from interface:com.oracle.coherence.persistence.PersistentStoreSuggest to this PersistentStore that the caller requires exclusive access to this store untilcloseis called on the returnedAutoCloseable.Note: the caller must call
closeon the returned object- Specified by:
exclusivelyin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Returns:
- an
AutoCloseableobject that requires close to be called on it when exclusive access is no longer needed
-
load
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.- Specified by:
loadin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lExtentId- the extent identifier for the keybufKey- key whose associated value is to be returned- Returns:
- the value associated with the specified key, or null if no value is available for that key
-
containsExtent
public boolean containsExtent(long lExtentId) Return true if the specified extend identifer exist.- Specified by:
containsExtentin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lExtentId- the extent identifier- Returns:
- true if the specified extend identifer exist
-
store
Store the specified value under the specific key in the underlying store. This method is intended to support both key-value pair creation and value update for a specific key.- Specified by:
storein interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lExtentId- the extent identifier for the key-value pairbufKey- key to store the value underbufValue- value to be storedoToken- optional token that represents a set of mutating operations to be committed as an atomic unit; if null, the given key-value pair will be committed to the store automatically by this method
-
erase
Remove the specified key from the underlying store if present.- Specified by:
erasein interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
lExtentId- the extent identifier for the keybufKey- key whose mapping is to be removedoToken- optional token that represents a set of mutating operations to be committed as an atomic unit; if null, the removal of the given key will be committed to the store automatically by this method
-
iterate
Iterate the key-value pairs in the persistent store, applying the specified visitor to each key-value pair.- Specified by:
iteratein interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
visitor- the visitor to apply
-
begin
Begin a new sequence of mutating operations that should be committed to the store as an atomic unit. The returned token should be passed to all mutating operations that should be part of the atomic unit. Once the sequence of operations have been performed, they must either becommittedto the store or the atomic unit must beaborted.- Specified by:
beginin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Returns:
- a token that represents the atomic unit
-
begin
Begin a new sequence of mutating operations that should be committed to the store asynchronously as an atomic unit. The returned token should be passed to all mutating operations that should be part of the atomic unit. Once the sequence of operations have been performed, they must either becommittedto the store or the atomic unit must beaborted.If a collector is passed to this method, the specified receipt will be added to it when the unit is committed. If the operation is
abortedor an error occurs during the commit, anAsyncPersistenceExceptionthat wraps the cause and specified receipt will be added. Finally, the collector will be flushed.- Specified by:
beginin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
collector- an optional collectoroReceipt- a receipt to be added to the collector (if any) when the unit is committed- Returns:
- a token representing the atomic unit that will be committed asynchronously
-
commit
Commit a sequence of mutating operations represented by the given token as an atomic unit.- Specified by:
commitin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
oToken- a token that represents the atomic unit to commit
-
abort
Abort an atomic sequence of mutating operations.- Specified by:
abortin interfacecom.oracle.coherence.persistence.PersistentStore<ReadBuffer>- Parameters:
oToken- a token that represents the atomic unit to abort
-
copyToTrash
public void copyToTrash()Copy the store to trash if the meta.properties file exist. -
submitOpen
protected void submitOpen(com.oracle.coherence.persistence.PersistentStore<ReadBuffer> storeFrom, Collector<Object> collector) Open this store either asynchronously, iff both a store to open from and a collector have been provided, or synchronously.- Parameters:
storeFrom- aPersistentStoreto copy fromcollector- acollectorto notify when the open completes
-
open
Open this persistent store.- Parameters:
storeFrom- the PersistenceStore the new store should be based upon- Returns:
- true if the store was created
-
release
protected void release()Release any resources held by this persistent store. -
delete
protected boolean delete(boolean fSafe) Release any resources held by this persistent store and delete any underlying persistent storage.- Parameters:
fSafe- if true, remove the store by moving it to a restorable location (if possible) rather than deleting it- Returns:
- true if the store was successfully deleted, false otherwise
-
ensureReady
protected void ensureReady()Block the calling thread until the store is either ready to accept requests or the store has been closed.- Throws:
com.oracle.coherence.persistence.PersistenceException- if the store has been closed or the thread was interrupted
-
isReady
protected boolean isReady()Return true if the store is ready to accept requests.- Returns:
- true if the store is ready to accept requests
-
isClosed
protected boolean isClosed()Return true if the store has been closed.- Returns:
- true if the store has been closed
-
setState
protected void setState(int nState) Set the state of this store.- Parameters:
nState- the state the store should be transitioned to
-
isExclusive
protected boolean isExclusive()Return true if this store is in exclusive mode.- Returns:
- true if this store is in exclusive mode
-
instantiateExclusiveClosable
Return anAutoCloseablethat will transition this PersistentStore out of exclusive mode.- Returns:
- an AutoCloseable that will transition this PersistentStore out of exclusive mode
-
toString
Return a human readable description of this AbstractPersistentStore. -
ensurePersistenceException
protected com.oracle.coherence.persistence.PersistenceException ensurePersistenceException(Throwable eCause) Return a PersistenceException with the given cause. The returned exception is also initialized with this store, its manager, and its environment (if available).- Parameters:
eCause- an optional cause- Returns:
- a PersistenceException with the given cause
-
ensurePersistenceException
protected com.oracle.coherence.persistence.PersistenceException ensurePersistenceException(Throwable eCause, String sMessage) Return a PersistenceException with the given cause and detail message. The returned exception is also initialized with this store, its manager, and its environment (if available).- Parameters:
eCause- an optional causesMessage- an optional detail message- Returns:
- a PersistenceException with the given cause and detail message
-
lockStorage
protected final boolean lockStorage()Acquire an exclusive lock on the data directory underlying this persistent store.- Returns:
- true if an exclusive lock was obtained, false otherwise
-
unlockStorage
protected final void unlockStorage()Release an exclusive lock on the data directory underlying this persistent store. -
lockRead
protected final void lockRead()Acquire a read lock on this persistent store. -
unlockRead
protected final void unlockRead()Release a read lock on this persistent store. -
lockWrite
protected final void lockWrite()Acquire a write lock on this persistent store. -
unlockWrite
protected final void unlockWrite()Release a write lock on this persistent store. -
validateExtentId
protected boolean validateExtentId(long lExtentId) Validate the given extent identifier.- Parameters:
lExtentId- the extent identifier
-
validateMetadata
protected void validateMetadata()Validate the metadata -
ensureExtentInternal
protected boolean ensureExtentInternal(long lExtentId) Ensure the provided extent id has been registered and created, thus allowing subsequent load and store operations against the same extent id.Note: the caller is assumed to have exclusive access to this store.
- Parameters:
lExtentId- the extent id to register and create- Returns:
- true if the extent id was not previously registered and was successfully created
-
copyAndOpenInternal
protected void copyAndOpenInternal(com.oracle.coherence.persistence.PersistentStore<ReadBuffer> storeFrom) Copy the provided store to ensure both the contents are available in the new store and it is open thus ready to receive requests.Note: overriders of this method must guarantee
openInternal()is called by either delegating to super or calling it directly.- Parameters:
storeFrom- the store to copy from
-
openInternal
protected abstract void openInternal()Open the underlying persistent storage.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
releaseInternal
protected abstract void releaseInternal()Release the underlying persistent storage.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
deleteInternal
protected abstract boolean deleteInternal()Remove the underlying persistent storage.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Returns:
trueon successful removal- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
loadExtentIdsInternal
Populate the given set with the identifiers of extents in the underlying persistent storage.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Parameters:
setIds- a set of ids- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
createExtentInternal
protected abstract void createExtentInternal(long lExtentId) Create the extent with the given identifier in the persistent store.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Parameters:
lExtentId- the identifier of the extent to create- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
deleteExtentInternal
protected abstract void deleteExtentInternal(long lExtentId) Delete the specified extent from the persistent store.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Parameters:
lExtentId- the identifier of the extent to delete- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
moveExtentInternal
protected void moveExtentInternal(long lOldExtentId, long lNewExtentId) Move the specified extent from the old extent id to the new extent id.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Parameters:
lOldExtentId- the old extent identifierlNewExtentId- the new extent identifier- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
truncateExtentInternal
protected abstract void truncateExtentInternal(long lExtentId) Truncate the specified extent from the persistent store.Note: this method is guaranteed to only be called by a thread that holds a write lock on this persistent store.
- Parameters:
lExtentId- the identifier of the extent to truncate- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
loadInternal
Load and return the value associated with the specified key from the underlying persistent storage.Note: this method is guaranteed to only be called by a thread that holds a read lock on this persistent store.
- Parameters:
lExtentId- the extent identifier for the keybufKey- key whose associated value is to be returned- Returns:
- the value associated with the specified key, or null if no value is available for that key
- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
storeInternal
protected abstract void storeInternal(long lExtentId, ReadBuffer bufKey, ReadBuffer bufValue, Object oToken) Store the specified value under the specific key in the underlying persistent storage.Note: this method is guaranteed to only be called by a thread that holds a read lock on this persistent store.
- Parameters:
lExtentId- the extent identifier for the keybufKey- key to store the value underbufValue- value to be storedoToken- a token that represents an atomic unit to commit- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occursIllegalArgumentException- if the token is invalid
-
eraseInternal
Remove the specified key from the underlying persistent storage if present.Note: this method is guaranteed to only be called by a thread that holds a read lock on this persistent store.
- Parameters:
lExtentId- the extent identifier for the keybufKey- key whose mapping is to be removed from the mapoToken- a token that represents an atomic unit to commit- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occursIllegalArgumentException- if the token is invalid
-
iterateInternal
protected abstract void iterateInternal(com.oracle.coherence.persistence.PersistentStore.Visitor<ReadBuffer> visitor) Iterate the key-value pairs in the underlying persistent storage, applying the specified visitor to each key-value pair.Note: this method is guaranteed to only be called by a thread that holds a read lock on this persistent store.
- Parameters:
visitor- the visitor to apply- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
beginInternal
Begin a sequence of mutating operations that should be committed atomically and return a token that represents the atomic unit.Note: this method is guaranteed to only be called by a thread that holds a read lock on this persistent store.
- Returns:
- a token that represents the atomic unit to commit
- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occurs
-
commitInternal
Commit a sequence of mutating operations represented by the given token as an atomic unit.Note: this method is guaranteed to only be called by a thread that holds a read lock on this persistent store.
- Parameters:
oToken- a token that represents the atomic unit to commit- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occursIllegalArgumentException- if the token is invalid
-
abortInternal
Abort an atomic sequence of mutating operations.Note: this method is guaranteed to only be called by a thread that holds a read lock on this persistent store.
- Parameters:
oToken- a token that represents the atomic unit to abort- Throws:
com.oracle.coherence.persistence.PersistenceException- if a general persistence error occursIllegalArgumentException- if the token is invalid
-
getDataDirectory
The directory used to store persisted data.- Returns:
- the underlying data storage directory
-