Add getter and setter for DelayedExecutorService#repeater
This commit is contained in:
parent
7988bcdf12
commit
ef3ecbaa43
1 changed files with 18 additions and 0 deletions
|
@ -31,6 +31,24 @@ public class DelayedExecutorService {
|
||||||
}
|
}
|
||||||
private DelayedExecutorService(){}
|
private DelayedExecutorService(){}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the executor to use for this delayed executor service
|
||||||
|
* @param exec The executor to use
|
||||||
|
*/
|
||||||
|
public static void setExecutor(ScheduledThreadPoolExecutor exec)
|
||||||
|
{
|
||||||
|
repeater = exec;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests the active executor instance
|
||||||
|
* @return The thread executor
|
||||||
|
*/
|
||||||
|
public static ScheduledThreadPoolExecutor getExecutor()
|
||||||
|
{
|
||||||
|
return repeater;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is designed to set back up the executor if it was previously stopped and restarted.
|
* This function is designed to set back up the executor if it was previously stopped and restarted.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue