419 * |
419 * |
420 * <p>Persistence policy from the MBean and attribute descriptor |
420 * <p>Persistence policy from the MBean and attribute descriptor |
421 * is used to guide execution of this method. The MBean should be |
421 * is used to guide execution of this method. The MBean should be |
422 * stored if 'persistPolicy' field is:</p> |
422 * stored if 'persistPolicy' field is:</p> |
423 * |
423 * |
424 * <PRE> != "never" |
424 * <PRE>{@literal != "never" |
425 * = "always" |
425 * = "always" |
426 * = "onTimer" and now > 'lastPersistTime' + 'persistPeriod' |
426 * = "onTimer" and now > 'lastPersistTime' + 'persistPeriod' |
427 * = "NoMoreOftenThan" and now > 'lastPersistTime' + 'persistPeriod' |
427 * = "NoMoreOftenThan" and now > 'lastPersistTime' + 'persistPeriod' |
428 * = "onUnregister" |
428 * = "onUnregister" |
429 * </PRE> |
429 * }</PRE> |
430 * |
430 * |
431 * <p>Do not store the MBean if 'persistPolicy' field is:</p> |
431 * <p>Do not store the MBean if 'persistPolicy' field is:</p> |
432 * <PRE> |
432 * <PRE>{@literal |
433 * = "never" |
433 * = "never" |
434 * = "onUpdate" |
434 * = "onUpdate" |
435 * = "onTimer" && now < 'lastPersistTime' + 'persistPeriod' |
435 * = "onTimer" && now < 'lastPersistTime' + 'persistPeriod' |
436 * </PRE> |
436 * }</PRE> |
437 * |
437 * |
438 * @exception MBeanException Wraps another exception, or |
438 * @exception MBeanException Wraps another exception, or |
439 * persistence is not supported |
439 * persistence is not supported |
440 * @exception RuntimeOperationsException Wraps exceptions from the |
440 * @exception RuntimeOperationsException Wraps exceptions from the |
441 * persistence mechanism |
441 * persistence mechanism |
467 * The 'value' field is returned. |
467 * The 'value' field is returned. |
468 * The 'lastUpdatedTimeStamp' field is not checked.</li> |
468 * The 'lastUpdatedTimeStamp' field is not checked.</li> |
469 * <li><b>>0</b> Represents the number of seconds that the |
469 * <li><b>>0</b> Represents the number of seconds that the |
470 * 'value' field is valid. |
470 * 'value' field is valid. |
471 * The 'value' field is no longer valid when |
471 * The 'value' field is no longer valid when |
472 * 'lastUpdatedTimeStamp' + 'currencyTimeLimit' > Now.</li> |
472 * 'lastUpdatedTimeStamp' + 'currencyTimeLimit' > Now. |
|
473 * <ul> |
|
474 * <li>When 'value' is valid, 'valid' is returned.</li> |
|
475 * <li>When 'value' is no longer valid then null is returned and |
|
476 * 'value' and 'lastUpdatedTimeStamp' fields are cleared.</li> |
|
477 * </ul> |
|
478 * </li> |
473 * </ul> |
479 * </ul> |
474 * <li>When 'value' is valid, 'valid' is returned.</li> |
|
475 * <li>When 'value' is no longer valid then null is returned and |
|
476 * 'value' and 'lastUpdatedTimeStamp' fields are cleared.</li> |
|
477 * |
480 * |
478 **/ |
481 **/ |
479 private Object resolveForCacheValue(Descriptor descr) |
482 private Object resolveForCacheValue(Descriptor descr) |
480 throws MBeanException, RuntimeOperationsException { |
483 throws MBeanException, RuntimeOperationsException { |
481 |
484 |
1840 * <br>Store the MBean if 'persistPolicy' field is: |
1843 * <br>Store the MBean if 'persistPolicy' field is: |
1841 * <UL> |
1844 * <UL> |
1842 * <Li> != "never"</Li> |
1845 * <Li> != "never"</Li> |
1843 * <Li> = "always"</Li> |
1846 * <Li> = "always"</Li> |
1844 * <Li> = "onUpdate"</Li> |
1847 * <Li> = "onUpdate"</Li> |
1845 * <Li> = "onTimer" and now > 'lastPersistTime' + 'persistPeriod'</Li> |
1848 * <Li> {@literal = "onTimer" and now > 'lastPersistTime' + 'persistPeriod'}</Li> |
1846 * <Li> = "NoMoreOftenThan" and now > 'lastPersistTime' + |
1849 * <Li> {@literal = "NoMoreOftenThan" and now > 'lastPersistTime' + |
1847 * 'persistPeriod'</Li> |
1850 * 'persistPeriod'}</Li> |
1848 * </UL> |
1851 * </UL> |
1849 * Do not store the MBean if 'persistPolicy' field is: |
1852 * Do not store the MBean if 'persistPolicy' field is: |
1850 * <UL> |
1853 * <UL> |
1851 * <Li> = "never"</Li> |
1854 * <Li> = "never"</Li> |
1852 * <Li> = "onTimer" && now < 'lastPersistTime' + 'persistPeriod'</Li> |
1855 * <Li> = {@literal = "onTimer" && now < 'lastPersistTime' + 'persistPeriod'}</Li> |
1853 * <Li> = "onUnregister"</Li> |
1856 * <Li> = "onUnregister"</Li> |
1854 * <Li> = "NoMoreOftenThan" and now < 'lastPersistTime' + |
1857 * <Li> = {@literal = "NoMoreOftenThan" and now < 'lastPersistTime' + |
1855 * 'persistPeriod'</Li> |
1858 * 'persistPeriod'}</Li> |
1856 * </UL> |
1859 * </UL> |
1857 * |
1860 * |
1858 * <p>The ModelMBeanInfo of the Model MBean is stored in a file. |
1861 * <p>The ModelMBeanInfo of the Model MBean is stored in a file. |
1859 * |
1862 * |
1860 * @param attribute The Attribute instance containing the name of |
1863 * @param attribute The Attribute instance containing the name of |