Package com.linkedin.alpini.netty4.misc
Class InstrumentibleEventExecutor
- java.lang.Object
-
- io.netty.util.concurrent.AbstractEventExecutorGroup
-
- com.linkedin.alpini.netty4.misc.InstrumentibleEventExecutor
-
- All Implemented Interfaces:
io.netty.util.concurrent.EventExecutorGroup,java.lang.Iterable<io.netty.util.concurrent.EventExecutor>,java.util.concurrent.Executor,java.util.concurrent.ExecutorService,java.util.concurrent.ScheduledExecutorService
public class InstrumentibleEventExecutor extends io.netty.util.concurrent.AbstractEventExecutorGroup
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classInstrumentibleEventExecutor.Completion
-
Constructor Summary
Constructors Constructor Description InstrumentibleEventExecutor(io.netty.util.concurrent.EventExecutorGroup eventExecutorGroup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long timeout, java.util.concurrent.TimeUnit unit)booleanisShutdown()booleanisShuttingDown()booleanisTerminated()java.util.Iterator<io.netty.util.concurrent.EventExecutor>iterator()protected InstrumentibleEventExecutor.CompletionnewCompletion()io.netty.util.concurrent.EventExecutornext()protected voidonComplete(InstrumentibleEventExecutor.Completion completion, boolean isSuccess)Invoked after completion of the taskprotected voidonExec(InstrumentibleEventExecutor.Completion completion)Invoked on the executing thread before execution of the taskprotected voidonSchedule(InstrumentibleEventExecutor.Completion completion)Invoked when the task is scheduled for later execution.protected voidonSubmit(InstrumentibleEventExecutor.Completion completion)Invoked when the task is scheduled for immediate executionvoidshutdown()io.netty.util.concurrent.Future<?>shutdownGracefully(long quietPeriod, long timeout, java.util.concurrent.TimeUnit unit)io.netty.util.concurrent.Future<?>terminationFuture()-
Methods inherited from class io.netty.util.concurrent.AbstractEventExecutorGroup
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
-
-
-
-
Method Detail
-
isShuttingDown
public boolean isShuttingDown()
-
shutdownGracefully
public io.netty.util.concurrent.Future<?> shutdownGracefully(long quietPeriod, long timeout, java.util.concurrent.TimeUnit unit)
-
terminationFuture
public io.netty.util.concurrent.Future<?> terminationFuture()
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceio.netty.util.concurrent.EventExecutorGroup- Specified by:
shutdownin interfacejava.util.concurrent.ExecutorService- Specified by:
shutdownin classio.netty.util.concurrent.AbstractEventExecutorGroup
-
isShutdown
public boolean isShutdown()
-
isTerminated
public boolean isTerminated()
-
awaitTermination
public boolean awaitTermination(long timeout, @Nonnull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
next
public io.netty.util.concurrent.EventExecutor next()
-
iterator
@Nonnull public java.util.Iterator<io.netty.util.concurrent.EventExecutor> iterator()
-
onSubmit
protected void onSubmit(InstrumentibleEventExecutor.Completion completion)
Invoked when the task is scheduled for immediate execution- Parameters:
completion-
-
onSchedule
protected void onSchedule(InstrumentibleEventExecutor.Completion completion)
Invoked when the task is scheduled for later execution.- Parameters:
completion-
-
onExec
protected void onExec(InstrumentibleEventExecutor.Completion completion)
Invoked on the executing thread before execution of the task- Parameters:
completion-
-
onComplete
protected void onComplete(InstrumentibleEventExecutor.Completion completion, boolean isSuccess)
Invoked after completion of the task- Parameters:
completion-isSuccess-
-
newCompletion
protected InstrumentibleEventExecutor.Completion newCompletion()
-
-