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 class
InstrumentibleEventExecutor.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 boolean
awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
boolean
isShutdown()
boolean
isShuttingDown()
boolean
isTerminated()
java.util.Iterator<io.netty.util.concurrent.EventExecutor>
iterator()
protected InstrumentibleEventExecutor.Completion
newCompletion()
io.netty.util.concurrent.EventExecutor
next()
protected void
onComplete(InstrumentibleEventExecutor.Completion completion, boolean isSuccess)
Invoked after completion of the taskprotected void
onExec(InstrumentibleEventExecutor.Completion completion)
Invoked on the executing thread before execution of the taskprotected void
onSchedule(InstrumentibleEventExecutor.Completion completion)
Invoked when the task is scheduled for later execution.protected void
onSubmit(InstrumentibleEventExecutor.Completion completion)
Invoked when the task is scheduled for immediate executionvoid
shutdown()
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:
shutdown
in interfaceio.netty.util.concurrent.EventExecutorGroup
- Specified by:
shutdown
in interfacejava.util.concurrent.ExecutorService
- Specified by:
shutdown
in 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()
-
-