Spring @ManagerResource的含义:persistPolicy,persistPeriod,persistLocation和currencyTimeLimit

Moh*_*sen 22 spring jmx spring-annotations

Spring @ManagedResource用于JMX 的以下字段是什么意思?Spring文档中没有Javadoc或相关描述.

 1. String persistPolicy() default "";
 2. int persistPeriod() default -1;
 3. String persistLocation() default "";
 4. int currencyTimeLimit() default -1;

gka*_*mal 20

这些传递到JMX api - 您可以在JMX java doc中找到有关它的更多信息.在此处复制相关部分 -

 persistPolicy  : OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never  
 persistLocation : The fully qualified directory name where the MBean should be persisted (if appropriate)
 persistFile    : File name into which the MBean should be persisted
 persistPeriod  : seconds - frequency of persist cycle for OnTime and NoMoreOftenThan PersistPolicy 
 currencyTimeLimit : how long value is valid, <0 never, =0 always, >0 seconds  
Run Code Online (Sandbox Code Playgroud)