Class PollingTaskManager
- java.lang.Object
-
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
-
- com.inductiveautomation.perspective.gateway.threading.PollingTaskManager
-
public class PollingTaskManager extends AbstractLifecycle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classPollingTaskManager.State
-
Constructor Summary
Constructors Constructor Description PollingTaskManager(PerspectiveContext context, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task)PollingTaskManager(java.util.concurrent.ScheduledExecutorService scheduler, java.util.concurrent.ExecutorService executor, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longgetRefreshRateFromProps()protected voidonRefreshRateChange(PropertyTreeChangeEvent event)protected voidonShutdown()protected voidonStartup()protected java.util.Optional<java.lang.Long>parseLong(QualifiedValue qv)voidsubmitIfIdle()Submits the task immediately if currently idle or scheduled.-
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
-
-
-
Constructor Detail
-
PollingTaskManager
public PollingTaskManager(PerspectiveContext context, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task)
-
PollingTaskManager
public PollingTaskManager(java.util.concurrent.ScheduledExecutorService scheduler, java.util.concurrent.ExecutorService executor, PropertyTree props, java.lang.String refreshRatePath, long defaultRate, java.lang.Runnable task)
-
-
Method Detail
-
submitIfIdle
public void submitIfIdle()
Submits the task immediately if currently idle or scheduled.
-
onStartup
protected void onStartup()
- Specified by:
onStartupin classAbstractLifecycle
-
onShutdown
protected void onShutdown()
- Specified by:
onShutdownin classAbstractLifecycle
-
onRefreshRateChange
protected void onRefreshRateChange(PropertyTreeChangeEvent event)
-
getRefreshRateFromProps
protected long getRefreshRateFromProps()
-
parseLong
protected java.util.Optional<java.lang.Long> parseLong(QualifiedValue qv)
-
-