Class PerspectivePollingBlockingTask
java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.ignition.common.execution.PollingBlockingTask
com.inductiveautomation.perspective.gateway.threading.PerspectivePollingBlockingTask
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
ConstructorsConstructorDescriptionPerspectivePollingBlockingTask
(PerspectiveContext context, PropertyTree props, String refreshRatePath, long defaultRate, Runnable task, String diagnosticId) PerspectivePollingBlockingTask
(ScheduledExecutorService scheduler, ExecutorService executor, PropertyTree props, String refreshRatePath, long defaultRate, Runnable task, String diagnosticId) -
Method Summary
Modifier and TypeMethodDescriptionprotected long
Default implementation returns the rate from the constructor, but provides a place for subclasses to re-define the rate on startup if necessary.protected long
protected void
protected void
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 Details
-
PerspectivePollingBlockingTask
public PerspectivePollingBlockingTask(PerspectiveContext context, PropertyTree props, String refreshRatePath, long defaultRate, Runnable task, String diagnosticId) -
PerspectivePollingBlockingTask
public PerspectivePollingBlockingTask(ScheduledExecutorService scheduler, ExecutorService executor, PropertyTree props, String refreshRatePath, long defaultRate, Runnable task, String diagnosticId)
-
-
Method Details
-
getInitialRate
protected long getInitialRate()Description copied from class:PollingBlockingTask
Default implementation returns the rate from the constructor, but provides a place for subclasses to re-define the rate on startup if necessary.- Overrides:
getInitialRate
in classPollingBlockingTask
-
onShutdown
protected void onShutdown()- Overrides:
onShutdown
in classPollingBlockingTask
-
onRefreshRateChange
-
getRefreshRateFromProps
protected long getRefreshRateFromProps() -
parseLong
-