Package com.biglybt.pifimpl.local.utils
Class UTTimerImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.utils.UTTimerImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
UTTimerImpl.timerEvent
-
Field Summary
Fields Modifier and Type Field Description private boolean
destroyed
private PluginInterface
plugin_interface
private Timer
timer
-
Constructor Summary
Constructors Modifier Constructor Description protected
UTTimerImpl(PluginInterface pi, java.lang.String name, boolean lightweight)
protected
UTTimerImpl(PluginInterface pi, java.lang.String name, int priority)
protected
UTTimerImpl(PluginInterface pi, java.lang.String name, int max_threads, int priority)
UTTimerImpl(java.lang.String name, boolean lightweight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UTTimerEvent
addEvent(long when, UTTimerEventPerformer ext_performer)
Create a single-shot event with delayUTTimerEvent
addPeriodicEvent(long periodic_millis, UTTimerEventPerformer ext_performer)
Create a periodic event that will fire every specified number of milliseconds until cancelled or the timer is destroyedvoid
destroy()
int
getActiveThreads()
int
getMaxThreads()
Releases resources associated with this timer and renders it unusable
-
-
-
Field Detail
-
plugin_interface
private PluginInterface plugin_interface
-
timer
private Timer timer
-
destroyed
private boolean destroyed
-
-
Constructor Detail
-
UTTimerImpl
public UTTimerImpl(java.lang.String name, boolean lightweight)
-
UTTimerImpl
protected UTTimerImpl(PluginInterface pi, java.lang.String name, boolean lightweight)
-
UTTimerImpl
protected UTTimerImpl(PluginInterface pi, java.lang.String name, int priority)
-
UTTimerImpl
protected UTTimerImpl(PluginInterface pi, java.lang.String name, int max_threads, int priority)
-
-
Method Detail
-
addEvent
public UTTimerEvent addEvent(long when, UTTimerEventPerformer ext_performer)
Description copied from interface:UTTimer
Create a single-shot event with delay
-
addPeriodicEvent
public UTTimerEvent addPeriodicEvent(long periodic_millis, UTTimerEventPerformer ext_performer)
Description copied from interface:UTTimer
Create a periodic event that will fire every specified number of milliseconds until cancelled or the timer is destroyed- Specified by:
addPeriodicEvent
in interfaceUTTimer
- Returns:
-
getMaxThreads
public int getMaxThreads()
Description copied from interface:UTTimer
Releases resources associated with this timer and renders it unusable- Specified by:
getMaxThreads
in interfaceUTTimer
-
getActiveThreads
public int getActiveThreads()
- Specified by:
getActiveThreads
in interfaceUTTimer
-
-