Package org.elasticsearch.transport
Class TcpTransport.ScheduledPing
- java.lang.Object
-
- org.elasticsearch.common.util.concurrent.AbstractRunnable
-
- org.elasticsearch.common.util.concurrent.AbstractLifecycleRunnable
-
- org.elasticsearch.transport.TcpTransport.ScheduledPing
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- TcpTransport
public class TcpTransport.ScheduledPing extends AbstractLifecycleRunnable
-
-
Constructor Summary
Constructors Constructor Description ScheduledPing()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doRunInLifecycle()
Perform runnable logic, but only if theAbstractLifecycleRunnable.lifecycle
is not stopped or closed.long
getFailedPings()
long
getSuccessfulPings()
protected void
onAfterInLifecycle()
This method is invoked in the finally block of the run method, but it is only executed if theAbstractLifecycleRunnable.lifecycle
is not stopped or closed.void
onFailure(java.lang.Exception e)
This method is invoked for all exception thrown byAbstractRunnable.doRun()
-
Methods inherited from class org.elasticsearch.common.util.concurrent.AbstractLifecycleRunnable
doRun, onAfter
-
Methods inherited from class org.elasticsearch.common.util.concurrent.AbstractRunnable
isForceExecution, onRejection, run
-
-
-
-
Method Detail
-
doRunInLifecycle
protected void doRunInLifecycle() throws java.lang.Exception
Description copied from class:AbstractLifecycleRunnable
Perform runnable logic, but only if theAbstractLifecycleRunnable.lifecycle
is not stopped or closed.- Specified by:
doRunInLifecycle
in classAbstractLifecycleRunnable
- Throws:
java.lang.InterruptedException
- if the run method throws anInterruptedException
java.lang.Exception
-
getSuccessfulPings
public long getSuccessfulPings()
-
getFailedPings
public long getFailedPings()
-
onAfterInLifecycle
protected void onAfterInLifecycle()
Description copied from class:AbstractLifecycleRunnable
This method is invoked in the finally block of the run method, but it is only executed if theAbstractLifecycleRunnable.lifecycle
is not stopped or closed.This method is most useful for rescheduling the next iteration of the current runnable.
- Overrides:
onAfterInLifecycle
in classAbstractLifecycleRunnable
-
onFailure
public void onFailure(java.lang.Exception e)
Description copied from class:AbstractRunnable
This method is invoked for all exception thrown byAbstractRunnable.doRun()
- Specified by:
onFailure
in classAbstractRunnable
-
-