|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 2 (11.1.2.2.0) E17486-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.adf.share.statemanager.javacache.StateManagerImpl
public class StateManagerImpl
A javacache based implementation of the StateManager.
Since the javacache is a shared JVM-level resource there are some restrictions that must be followed when using the javacache StateManager:
The javacache StateManager depends upon the distributed cache features of the javacache to persist and distribute state. If the javacache is configured externally for use elsewhere in the application it should be configured with the distribution option enabled and a disk path declared.
The javacache StateManager will create the StateManagerCacheAccess.STATE_MANAGER_CACHE_REGION
region for the managed states. The StateManager will create subregions within that region for each managed scope.
An application developer may specify the ENV_CACHE_ATTRIBUTES environment parameter when acquiring the StateManager default context to initialize and configure the Cache. The parameter value should be a CacheAttributes
instance. If the Cache has already been initialized (Cache.isReady) then the specified CacheAttributes will be ignored. If no CacheAttributes are specified and the Cache has not already been initialized then the StateManager implementation will configure and initialize the Cache with the distribution option enabled and with the disk path equal to the temporary system path (System.getProperty("java.io.tmpdir")).
Field Summary | |
---|---|
static java.lang.String |
ENV_CACHE_ATTRIBUTES |
Constructor Summary | |
---|---|
StateManagerImpl() |
Method Summary | |
---|---|
void |
clearStates(java.lang.Object context) Removes all states for the specified conext. |
java.lang.Object |
getState(java.lang.Object context, java.lang.Object id) Returns the specified state. |
java.lang.Object |
getUserAttributes(java.lang.Object context, java.lang.Object id) Returns the user attributes of the specified state. |
void |
init(java.util.Hashtable env) Invoked by the DefaultContext when the StateManager is instantiated. |
java.util.Iterator |
listStateIds(java.lang.Object context) Returns an iterator of the save point Ids. |
java.lang.Object |
putState(java.lang.Object context, java.lang.Object id, java.lang.Object state) Registers a state. |
java.lang.Object |
putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy) Registers a state with a management policy. |
java.lang.Object |
putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy, java.lang.Object userAttrs) Registers a state with a management policy. |
java.lang.Object |
removeState(java.lang.Object context, java.lang.Object id) Removes the specified state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ENV_CACHE_ATTRIBUTES
Constructor Detail |
---|
public StateManagerImpl()
Method Detail |
---|
public void init(java.util.Hashtable env)
StateManager
DefaultContext
when the StateManager is instantiated. Custom implementations may use the environment to perform custom initialization of the StateManager implementation.init
in interface StateManager
env
- the default context environmentpublic java.lang.Object getState(java.lang.Object context, java.lang.Object id)
StateManager
getState
in interface StateManager
context
- the ADF context of the required stateid
- the state idpublic java.lang.Object putState(java.lang.Object context, java.lang.Object id, java.lang.Object state)
StateManager
putState
in interface StateManager
context
- the ADF context of the stateid
- the state idstate
- the statepublic java.lang.Object putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy)
StateManager
putState
in interface StateManager
context
- the ADF context of the stateid
- the state idstate
- the statepolicy
- the management policy.public java.lang.Object putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy, java.lang.Object userAttrs)
StateManager
putState
in interface StateManager
context
- the ADF context of the stateid
- the state idstate
- the statepolicy
- the management policy.userAttrs
- user attributes to be associated with the state.public java.lang.Object removeState(java.lang.Object context, java.lang.Object id)
StateManager
removeState
in interface StateManager
context
- the ADF context of the required stateid
- the state idpublic void clearStates(java.lang.Object context)
StateManager
clearStates
in interface StateManager
context
- an ADF contextpublic java.lang.Object getUserAttributes(java.lang.Object context, java.lang.Object id)
StateManager
getUserAttributes
in interface StateManager
context
- the ADF context of the required stateid
- the state idpublic java.util.Iterator listStateIds(java.lang.Object context)
StateManager
listStateIds
in interface StateManager
context
- the ADF context of the required state
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 2 (11.1.2.2.0) E17486-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |