javax.management
public interface PersistentMBean
Since: 1.5
Method Summary | |
---|---|
void | load()
Instantiates the bean with the data previously stored
using a call to {@link #store()}. |
void | store() Captures the current state of the bean and stores it for future retrieval by the {@link #load()} method. |
Throws: MBeanException if persistence is not supported, or another exception is thrown (which this then wraps). RuntimeOperationsException if the persistence mechanism throws an exception. InstanceNotFoundException if the bean can not be found in the persistent store.
Captures the current state of the bean and stores it for future retrieval by the {@link #load()} method. The data stored can include values held by attributes as well as those returned by operations.
Whether the state is stored or not depends on the
persistPolicy
field of the MBean/attribute
descriptor. The state should be stored if the policy
is set to any of the following:
always
onTimer
and now
is
greater than or equal to lastPersistTime +
persistPeriod
.noMoreOftenThan
and now
is
greater than or equal to lastPersistTime +
persistPeriod
.If the policy is set to any of the following, the state should not be stored:
never
onUpdate
onTimer
and now
is
less than lastPersistTime + persistPeriod
.
Throws: MBeanException if persistence is not supported, or another exception is thrown (which this then wraps). RuntimeOperationsException if the persistence mechanism throws an exception. InstanceNotFoundException if the persistent store can not be found or accessed.