Interface DrivenValue<T>
- Type Parameters:
- T- The type of the driven value
- All Known Implementing Classes:
- AbstractStaticDrivenValue,- ExpressionDrivenQualifiedValue,- ExpressionDrivenStringValue,- ExpressionDrivenValue,- LockGuardedDrivenValue,- LockGuardedDrivenValueCollection
public interface DrivenValue<T>
A DrivenValue contains a value which can change (driven by some source). It has 
startup() and
 shutdown() hooks to allow the implementation to prepare / tear down its instance. The value may be
 fetched by calling getAndClear() which will fetch the current value and reset its dirty state to false.
 Clients should always startup() before using the instance. Before fetching the latest value,
 isReady() must be checked and must return true. If isDirty() returns false, the last value
 fetched is the latest value which will be returned on the next call to getAndClear(). When finished with
 the instance, shutdown() must be called to clean up.- 
Method SummaryModifier and TypeMethodDescriptionFetch the current driven valuebooleanisDirty()booleanisReady()default Collection<PropertyReference>Call before startup() to resolve and collect any references this value might depend on.voidshutdown()Lifecycle hook to shut down the driven valuevoidstartup()Lifecycle hook to start up the driven value
- 
Method Details- 
startupvoid startup()Lifecycle hook to start up the driven value
- 
shutdownvoid shutdown()Lifecycle hook to shut down the driven value
- 
resolveReferencesCall before startup() to resolve and collect any references this value might depend on.
- 
isReadyboolean isReady()- Returns:
- true if the driven value is ready to fetch
 
- 
isDirtyboolean isDirty()- Returns:
- true if the driven value has changed since the last time it was fetched
 
- 
getAndClearFetch the current driven value- Returns:
- An Optionalcontaining the current driven value, if present, or an empty Optional if the driven value is null / not present.
 
 
-