|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConfigPolicy
Implementations of this interface control the operational parameters of config objects. Implementations are not required to return consistent values between method calls. In-short, policies may be dynamic. It is expected that most policy implementations will extends the default implementation. Policies must be safe for concurrent access.
| Method Summary | |
|---|---|
java.lang.Object |
defaultForClass(java.lang.Class clss)
This method should return a default property value for the specified class. |
long |
getMinReadPeriod()
This method is called to determine the minimum period of time in milliseconds which must elapse before a config will consider refreshing configuration information. |
boolean |
isCachingEager()
This method is called to control whether the objects converted from configuration properties may be cached even if no class loader has been specified on a config. |
boolean |
isDefaultsCached()
This method is called to determine whether values created by the defaultForClass method may be cached for subsequent property requests. |
boolean |
isExceptionLogged()
Whether exceptions generated by the configuration source when accessing properties should be logged. |
boolean |
isExceptionThrown()
Whether exceptions generated by the configuration source when accessing properties should be thrown from the interface accessor methods. |
boolean |
isTimestampNewer(long newTimestamp,
long oldTimestamp)
This method is called to identify whether the change in the timestamp associated with a set of configuration properties represents a change in the properties. |
java.lang.String |
propertyFromMethod(java.lang.String methodName)
This method defines the mapping of method names on an interface to property names in the configuration. |
| Method Detail |
|---|
long getMinReadPeriod()
boolean isTimestampNewer(long newTimestamp,
long oldTimestamp)
newTimestamp - the latest timestamp reported by a ConfigSourceoldTimestamp - the previous timestamp reported by a ConfigSource
boolean isExceptionThrown()
boolean isExceptionLogged()
java.lang.String propertyFromMethod(java.lang.String methodName)
methodName - the name of a method being invoked
java.lang.Object defaultForClass(java.lang.Class clss)
clss - the return type of an accessor method
boolean isDefaultsCached()
boolean isCachingEager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||