Top Description Inners Fields Constructors Methods
io.vertx.core.net.impl.pool

public Class CombinerExecutor<S>

extends Object
implements Executor<S>
Class Inheritance
All Implemented Interfaces
io.vertx.core.net.impl.pool.Executor
Imports
io.netty.util.concurrent.FastThreadLocal, io.netty.util.internal.PlatformDependent, java.util.HashMap, .Map, .Queue, java.util.concurrent.atomic.AtomicInteger

Lock free executor. When a thread submits an action, it will enqueue the action to execute and then try to acquire a lock. When the lock is acquired it will execute all the tasks in the queue until empty and then release the lock.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Modifier and TypeField and Description
private static final FastThreadLocal<CombinerExecutor.InProgressTail<?>>
private final Queue<Executor.Action<S>>
q

private final AtomicInteger
s

private final S

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
submit(Executor.Action<S>
the action
action
)

Implements io.vertx.core.net.impl.pool.Executor.submit.

Submit an action.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentback to summary
private static final FastThreadLocal<CombinerExecutor.InProgressTail<?>> current
qback to summary
private final Queue<Executor.Action<S>> q
sback to summary
private final AtomicInteger s
stateback to summary
private final S state

Constructor Detail

CombinerExecutorback to summary
public CombinerExecutor(S state)

Method Detail

submitback to summary
public void submit(Executor.Action<S> action)

Implements io.vertx.core.net.impl.pool.Executor.submit.

Doc from io.vertx.core.net.impl.pool.Executor.submit.

Submit an action.

Parameters
action:Executor.Action<S>

the action

Annotations
@Override
io.vertx.core.net.impl.pool back to summary

protected final Class CombinerExecutor.InProgressTail<S>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final CombinerExecutor<S>
pack-priv Map<CombinerExecutor<S>, Task>
pack-priv Task

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

combinerback to summary
pack-priv final CombinerExecutor<S> combiner
othersback to summary
pack-priv Map<CombinerExecutor<S>, Task> others
taskback to summary
pack-priv Task task

Constructor Detail

InProgressTailback to summary
public InProgressTail(CombinerExecutor<S> combiner, Task task)