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 class
PollingTaskManager.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 long
getRefreshRateFromProps()
protected void
onRefreshRateChange(PropertyTreeChangeEvent event)
protected void
onShutdown()
protected void
onStartup()
protected java.util.Optional<java.lang.Long>
parseLong(QualifiedValue qv)
void
submitIfIdle()
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:
onStartup
in classAbstractLifecycle
-
onShutdown
protected void onShutdown()
- Specified by:
onShutdown
in classAbstractLifecycle
-
onRefreshRateChange
protected void onRefreshRateChange(PropertyTreeChangeEvent event)
-
getRefreshRateFromProps
protected long getRefreshRateFromProps()
-
parseLong
protected java.util.Optional<java.lang.Long> parseLong(QualifiedValue qv)
-
-