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 SummaryNested classes/interfaces inherited from class com.inductiveautomation.ignition.common.execution.PollingFuturePollingFuture.State
- 
Field SummaryFields inherited from class com.inductiveautomation.ignition.common.execution.PollingFutureLOG
- 
Constructor SummaryConstructorsConstructorDescriptionPerspectivePollingFuture(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 SummaryModifier 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.PollingFuturegetRateMillis, onStartup, setRate, submitIfIdleMethods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycleisRunning, shutdown, startup
- 
Constructor Details- 
PerspectivePollingFuturepublic PerspectivePollingFuture(PerspectiveContext context, PropertyTree props, String refreshRatePath, long defaultRate, Supplier<CompletableFuture<V>> fetch, BiConsumer<V, Throwable> consumer, String diagnosticId) 
- 
PerspectivePollingFuturepublic PerspectivePollingFuture(ScheduledExecutorService scheduler, ExecutorService executor, PropertyTree props, String refreshRatePath, long defaultRate, Supplier<CompletableFuture<V>> fetch, BiConsumer<V, Throwable> consumer, String diagnosticId) 
 
- 
- 
Method Details- 
getInitialRateprotected 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 class- PollingFuture<V>
 
- 
onShutdownprotected void onShutdown()- Overrides:
- onShutdownin class- PollingFuture<V>
 
- 
onRefreshRateChange
- 
getRefreshRateFromPropsprotected long getRefreshRateFromProps()
- 
parseLong
 
-