Class LockGuardedDrivenValueCollection<T,U,V extends DrivenValue<U>>
- java.lang.Object
-
- com.inductiveautomation.perspective.gateway.driven.LockGuardedDrivenValue<T>
-
- com.inductiveautomation.perspective.gateway.driven.LockGuardedDrivenValueCollection<T,U,V>
-
- Type Parameters:
T
- The type of the driven valueU
- The type of the driven values managed in the collectionV
- The type of the driven value which extendsDrivenValue
- All Implemented Interfaces:
DrivenValue<T>
public abstract class LockGuardedDrivenValueCollection<T,U,V extends DrivenValue<U>> extends LockGuardedDrivenValue<T>
A LockGuardedDrivenValueCollection is aLockGuardedDrivenValue
which provides implementations forisReadyInternal()
,isDirtyInternal()
,startup()
, andshutdown()
common to a managedCollection
ofDrivenValues
.
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.perspective.gateway.driven.LockGuardedDrivenValue
lock
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LockGuardedDrivenValueCollection(java.lang.Object lock)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.Collection<V>
getCollection()
Fetch the managedCollection
ofDrivenValues
protected boolean
isDirtyInternal()
Called after asserting that the calling thread holds the injected lock.protected boolean
isReadyInternal()
Called after asserting that the calling thread holds the injected lock.void
shutdown()
Lifecycle hook to shut down the driven valuevoid
startup()
Lifecycle hook to start up the driven value-
Methods inherited from class com.inductiveautomation.perspective.gateway.driven.LockGuardedDrivenValue
getAndClear, getAndClearInternal, isDirty, isReady
-
-
-
-
Method Detail
-
getCollection
@Nonnull protected abstract java.util.Collection<V> getCollection()
Fetch the managedCollection
ofDrivenValues
- Returns:
- The managed
Collection
ofDrivenValues
-
isReadyInternal
protected boolean isReadyInternal()
Description copied from class:LockGuardedDrivenValue
Called after asserting that the calling thread holds the injected lock.- Specified by:
isReadyInternal
in classLockGuardedDrivenValue<T>
- See Also:
LockGuardedDrivenValue.isReady()
-
isDirtyInternal
protected boolean isDirtyInternal()
Description copied from class:LockGuardedDrivenValue
Called after asserting that the calling thread holds the injected lock.- Specified by:
isDirtyInternal
in classLockGuardedDrivenValue<T>
- See Also:
LockGuardedDrivenValue.isDirty()
-
startup
public void startup()
Description copied from interface:DrivenValue
Lifecycle hook to start up the driven value
-
shutdown
public void shutdown()
Description copied from interface:DrivenValue
Lifecycle hook to shut down the driven value
-
-