public class SafePersistenceWrappers extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
SafePersistenceWrappers.FailureContinuationFactory<R,T extends Throwable>
FailureContinuationFactory encapsulates failure continuations to handle
unexpected exceptions thrown by implementations of the various persistence
layers.
|
static class |
SafePersistenceWrappers.SafePersistenceEnvironment<R,T extends Throwable>
SafePersistenceEnvironment is a wrapper PersistenceEnvironment implementation
which protects all operations on the underlying environment (and any
PersistenceManger or PersistentStore instances opened through this environment)
from unexpected failures, delegating the exception handling to a failure
Continuation . |
static class |
SafePersistenceWrappers.SafePersistenceManager<R,T extends Throwable>
SafePersistenceManager is a wrapper PersistenceManager implementation which
protects all operations on the underlying manager (and any PersistentStore
instances opened by the manager) from unexpected failures, delegating
the exception handling to a failure
Continuation . |
static class |
SafePersistenceWrappers.SafePersistentStore<R,T extends Throwable>
SafePersistentStore is a wrapper PersistentStore implementation which
protects all synchronous operations on the underlying store from
unexpected failures, delegating the exception handling to a failure
Continuation . |
Modifier and Type | Field and Description |
---|---|
static SafePersistenceWrappers.FailureContinuationFactory |
DEFAULT_FACTORY
Default failure continuation factory that provides null continuations.
|
Constructor and Description |
---|
SafePersistenceWrappers() |
Modifier and Type | Method and Description |
---|---|
protected static <R,T extends Throwable> |
getSimpleFactory(com.oracle.coherence.common.base.Continuation<? super T> cont)
Return a simple FailureContinuationFactory that uses the specified failure
continuation to handle failures at any layer of the persistence
implementation.
|
static <R> com.oracle.coherence.persistence.PersistenceEnvironment<R> |
unwrap(com.oracle.coherence.persistence.PersistenceEnvironment<R> env)
Return the underlying (non-"Safe") PersistenceEnvironment.
|
static <R> com.oracle.coherence.persistence.PersistenceManager<R> |
unwrap(com.oracle.coherence.persistence.PersistenceManager<R> mgr)
Return the underlying (non-"Safe") PersistenceManager.
|
static <R> com.oracle.coherence.persistence.PersistentStore<R> |
unwrap(com.oracle.coherence.persistence.PersistentStore<R> store)
Return the underlying (non-"Safe") PersistentStore.
|
public static final SafePersistenceWrappers.FailureContinuationFactory DEFAULT_FACTORY
public static <R> com.oracle.coherence.persistence.PersistenceEnvironment<R> unwrap(com.oracle.coherence.persistence.PersistenceEnvironment<R> env)
R
- the type of a raw, environment specific object representationenv
- a PersistenceEnvironmentpublic static <R> com.oracle.coherence.persistence.PersistenceManager<R> unwrap(com.oracle.coherence.persistence.PersistenceManager<R> mgr)
R
- the type of a raw, environment specific object representationmgr
- a PersistenceManagerpublic static <R> com.oracle.coherence.persistence.PersistentStore<R> unwrap(com.oracle.coherence.persistence.PersistentStore<R> store)
R
- the type of a raw, environment specific object representationstore
- a PersistentStoreprotected static <R,T extends Throwable> SafePersistenceWrappers.FailureContinuationFactory<R,T> getSimpleFactory(com.oracle.coherence.common.base.Continuation<? super T> cont)
R
- the type of a raw, environment specific object representationT
- the type of a Throwable failure to protectcont
- the failure continuation