|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.scaleoutsoftware.soss.client.BackingStorePolicy
public final class BackingStorePolicy
Contains options to control how a NamedCache interacts with a backing store. A BackingStorePolicy is associated with a
NamedCache and BackingStore instance through a call to NamedCache.setBackingStoreAdapter().
NamedCache.retrieve and
NamedCache.get methods when a cache miss occurs.
The first client to perform a retrieval operation on an object that's missing from the cache will have its BackingStore.load implementation invoked. While the
backing store is being queried, other clients requesting this object will repeatedly poll until the object has been inserted into the cache. The frequency of the
polling behavior can be controlled by using NamedCache.setReadPendingRetryInterval and NamedCache.setMaxReadThroughPendingAttempts methods.
The enableWriteThrough property is used to indicate to the StateServer that the client will be performing write-through operations via an
implementation of BackingStore.store.
Changing properties of the BackingStorePolicy after a call to NamedCache.setBackingStoreAdapter will not change
the NamedCache's behavior - setBackingStoreAdapter must be called again for the new policy options to take
effect.
| Constructor Summary | |
|---|---|
BackingStorePolicy()
Creates a BackingStorePolicy object with all options set to false. |
|
BackingStorePolicy(boolean enableAsyncOperations,
boolean enableReadThrough,
boolean enableWriteThrough)
Creates a BackingStorePolicy object. |
|
| Method Summary | |
|---|---|
boolean |
getEnableAsyncOperations()
If true, a client will handle asynchronous refresh-ahead/write-behind operations. |
boolean |
getEnableReadThrough()
If true, a client will populate the StateServer automatically from a database (or
other type of backing store) when a cache miss occurs by invoking the BackingStore.load
method. |
boolean |
getEnableWriteThrough()
If true, a client will synchronously write changes to a database (or
other type of backing store) when a cached object is updated or created in the cache
by invoking the BackingStore.store method. |
void |
setEnableAsyncOperations(boolean enableAsyncOperations)
If true, a client will handle asynchronous refresh-ahead/write-behind operations. |
void |
setEnableReadThrough(boolean enableReadThrough)
If true, a client will populate the StateServer automatically from a database (or
other type of backing store) when a cache miss occurs by invoking the BackingStore.load
method. |
void |
setEnableWriteThrough(boolean enableWriteThrough)
If true, a client will synchronously write changes to a database (or
other type of backing store) when a cached object is updated or created in the cache
by invoking the BackingStore.store method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BackingStorePolicy()
false.
public BackingStorePolicy(boolean enableAsyncOperations,
boolean enableReadThrough,
boolean enableWriteThrough)
enableAsyncOperations - Indicates whether this client will handle asynchronous refresh-ahead/write-behind operationsenableReadThrough - If true, a client will populate the StateServer automatically from a database (or
other type of backing store) when a cache miss occurs by invoking the BackingStore.load
methodenableWriteThrough - If true, a client will synchronously write changes to a database (or
other type of backing store) when a cached object is updated or created in the cache
by invoking the BackingStore.store method| Method Detail |
|---|
public boolean getEnableAsyncOperations()
true, a client will handle asynchronous refresh-ahead/write-behind operations.
public void setEnableAsyncOperations(boolean enableAsyncOperations)
true, a client will handle asynchronous refresh-ahead/write-behind operations.
enableAsyncOperations - new enableAsyncOperations valuepublic boolean getEnableReadThrough()
true, a client will populate the StateServer automatically from a database (or
other type of backing store) when a cache miss occurs by invoking the BackingStore.load
method.
public void setEnableReadThrough(boolean enableReadThrough)
true, a client will populate the StateServer automatically from a database (or
other type of backing store) when a cache miss occurs by invoking the BackingStore.load
method.
enableReadThrough - new enableReadThrough valuepublic boolean getEnableWriteThrough()
true, a client will synchronously write changes to a database (or
other type of backing store) when a cached object is updated or created in the cache
by invoking the BackingStore.store method.
public void setEnableWriteThrough(boolean enableWriteThrough)
true, a client will synchronously write changes to a database (or
other type of backing store) when a cached object is updated or created in the cache
by invoking the BackingStore.store method.
enableWriteThrough - new enableWriteThrough value
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||