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 voiddoRunInLifecycle()Perform runnable logic, but only if theAbstractLifecycleRunnable.lifecycleis not stopped or closed.longgetFailedPings()longgetSuccessfulPings()protected voidonAfterInLifecycle()This method is invoked in the finally block of the run method, but it is only executed if theAbstractLifecycleRunnable.lifecycleis not stopped or closed.voidonFailure(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.ExceptionDescription copied from class:AbstractLifecycleRunnablePerform runnable logic, but only if theAbstractLifecycleRunnable.lifecycleis not stopped or closed.- Specified by:
doRunInLifecyclein classAbstractLifecycleRunnable- Throws:
java.lang.InterruptedException- if the run method throws anInterruptedExceptionjava.lang.Exception
-
getSuccessfulPings
public long getSuccessfulPings()
-
getFailedPings
public long getFailedPings()
-
onAfterInLifecycle
protected void onAfterInLifecycle()
Description copied from class:AbstractLifecycleRunnableThis method is invoked in the finally block of the run method, but it is only executed if theAbstractLifecycleRunnable.lifecycleis not stopped or closed.This method is most useful for rescheduling the next iteration of the current runnable.
- Overrides:
onAfterInLifecyclein classAbstractLifecycleRunnable
-
onFailure
public void onFailure(java.lang.Exception e)
Description copied from class:AbstractRunnableThis method is invoked for all exception thrown byAbstractRunnable.doRun()- Specified by:
onFailurein classAbstractRunnable
-
-