Class PerspectivePollingFuture<V>
java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.ignition.common.execution.PollingFuture<V>
com.inductiveautomation.perspective.gateway.threading.PerspectivePollingFuture<V>
Manages a polling task that looks up its rate from a property tree and is reactive to the rate changing.
- 
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.common.execution.PollingFuture
PollingFuture.State - 
Field Summary
Fields inherited from class com.inductiveautomation.ignition.common.execution.PollingFuture
LOG - 
Constructor Summary
ConstructorsConstructorDescriptionPerspectivePollingFuture(PerspectiveContext context, PropertyTree props, String refreshRatePath, long defaultRate, Supplier<CompletableFuture<V>> fetch, BiConsumer<V, Throwable> consumer, String diagnosticId) PerspectivePollingFuture(ScheduledExecutorService scheduler, ExecutorService executor, PropertyTree props, String refreshRatePath, long defaultRate, Supplier<CompletableFuture<V>> fetch, BiConsumer<V, Throwable> consumer, String diagnosticId)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected longDefault implementation returns the rate from the constructor, but provides a place for subclasses to re-define the rate on startup if necessary.protected longprotected voidprotected voidMethods inherited from class com.inductiveautomation.ignition.common.execution.PollingFuture
getRateMillis, onStartup, setRate, submitIfIdleMethods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup 
- 
Constructor Details
- 
PerspectivePollingFuture
public PerspectivePollingFuture(PerspectiveContext context, PropertyTree props, String refreshRatePath, long defaultRate, Supplier<CompletableFuture<V>> fetch, BiConsumer<V, Throwable> consumer, String diagnosticId)  - 
PerspectivePollingFuture
public PerspectivePollingFuture(ScheduledExecutorService scheduler, ExecutorService executor, PropertyTree props, String refreshRatePath, long defaultRate, Supplier<CompletableFuture<V>> fetch, BiConsumer<V, Throwable> consumer, String diagnosticId)  
 - 
 - 
Method Details
- 
getInitialRate
protected long getInitialRate()Description copied from class:PollingFutureDefault implementation returns the rate from the constructor, but provides a place for subclasses to re-define the rate on startup if necessary.- Overrides:
 getInitialRatein classPollingFuture<V>
 - 
onShutdown
protected void onShutdown()- Overrides:
 onShutdownin classPollingFuture<V>
 - 
onRefreshRateChange
 - 
getRefreshRateFromProps
protected long getRefreshRateFromProps() - 
parseLong
 
 -