Class RunOnce
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RunOnce
public RunOnce(java.lang.Runnable delegate)
-
-
Method Details
-
run
public void run()- Specified by:
run
in interfacejava.lang.Runnable
-
hasRun
public boolean hasRun()true
if theRunOnce
has been executed once.
-