Class PerspectivePollingBlockingTask
- java.lang.Object
-
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
-
- com.inductiveautomation.ignition.common.execution.PollingBlockingTask
-
- com.inductiveautomation.perspective.gateway.threading.PerspectivePollingBlockingTask
-
public class PerspectivePollingBlockingTask extends PollingBlockingTask
A polling blocking 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.PollingBlockingTask
PollingBlockingTask.State
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.ignition.common.execution.PollingBlockingTask
LOG
-
-
Constructor Summary
Constructors Constructor Description PerspectivePollingBlockingTask(PerspectiveContext context, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task, java.lang.String diagnosticId)PerspectivePollingBlockingTask(java.util.concurrent.ScheduledExecutorService scheduler, java.util.concurrent.ExecutorService executor, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task, java.lang.String diagnosticId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longgetInitialRate()Default implementation returns the rate from the constructor, but provides a place for subclasses to re-define the rate on startup if necessary.protected longgetRefreshRateFromProps()protected voidonRefreshRateChange(PropertyTreeChangeEvent event)protected voidonShutdown()protected java.util.Optional<java.lang.Long>parseLong(QualifiedValue qv)-
Methods inherited from class com.inductiveautomation.ignition.common.execution.PollingBlockingTask
onStartup, setRate, submitIfIdle
-
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
-
-
-
Constructor Detail
-
PerspectivePollingBlockingTask
public PerspectivePollingBlockingTask(PerspectiveContext context, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task, java.lang.String diagnosticId)
-
PerspectivePollingBlockingTask
public PerspectivePollingBlockingTask(java.util.concurrent.ScheduledExecutorService scheduler, java.util.concurrent.ExecutorService executor, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task, java.lang.String diagnosticId)
-
-
Method Detail
-
getInitialRate
protected long getInitialRate()
Description copied from class:PollingBlockingTaskDefault implementation returns the rate from the constructor, but provides a place for subclasses to re-define the rate on startup if necessary.- Overrides:
getInitialRatein classPollingBlockingTask
-
onShutdown
protected void onShutdown()
- Overrides:
onShutdownin classPollingBlockingTask
-
onRefreshRateChange
protected void onRefreshRateChange(PropertyTreeChangeEvent event)
-
getRefreshRateFromProps
protected long getRefreshRateFromProps()
-
parseLong
protected java.util.Optional<java.lang.Long> parseLong(QualifiedValue qv)
-
-