java.lang.Object
org.elasticsearch.common.util.concurrent.RunOnce
- All Implemented Interfaces:
java.lang.Runnable
public class RunOnce
extends java.lang.Object
implements java.lang.Runnable
Runnable that can only be run one time.
-
Constructor Summary
Constructors
Constructor |
Description |
RunOnce(java.lang.Runnable delegate) |
|
-
Method Summary
Modifier and Type |
Method |
Description |
boolean |
hasRun() |
true if the RunOnce has been executed once.
|
void |
run() |
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
public RunOnce(java.lang.Runnable delegate)
-
Method Details
-
public void run()
- Specified by:
run
in interface java.lang.Runnable
-
public boolean hasRun()
true
if the
RunOnce
has been executed once.