Top Inners Fields Constructors Methods
io.vertx.core.eventbus.impl.clustered

public Class Serializer

extends Object
implements Closeable
Class Inheritance
All Implemented Interfaces
io.vertx.core.Closeable
Imports
io.vertx.core.*, io.vertx.core.eventbus.Message, io.vertx.core.impl.ContextInternal, .VertxInternal, java.util.HashMap, .LinkedList, .Map, .Queue, java.util.concurrent.ConcurrentMap, java.util.function.BiConsumer

Author
Thomas Segismont

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final ContextInternal
private final Map<String, Serializer.SerializerQueue>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
close(Promise<Void>
the promise to signal when close has completed
completion
)

Implements io.vertx.core.Closeable.close.

Close this resource, the completion promise must be notified when the operation has completed.

public static Serializer
public <T> void
queue(Message<?> message, BiConsumer<Message<?>, Promise<T>> selectHandler, Promise<T> promise)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ctxback to summary
private final ContextInternal ctx
queuesback to summary
private final Map<String, Serializer.SerializerQueue> queues

Constructor Detail

Serializerback to summary
private Serializer(ContextInternal context)

Method Detail

closeback to summary
public void close(Promise<Void> completion)

Implements io.vertx.core.Closeable.close.

Doc from io.vertx.core.Closeable.close.

Close this resource, the completion promise must be notified when the operation has completed.

Parameters
completion:Promise<Void>

the promise to signal when close has completed

Annotations
@Override
getback to summary
public static Serializer get(ContextInternal context)
queueback to summary
public <T> void queue(Message<?> message, BiConsumer<Message<?>, Promise<T>> selectHandler, Promise<T> promise)
io.vertx.core.eventbus.impl.clustered back to summary

private Class Serializer.SerializerQueue

extends Object
Class Inheritance
  • java.lang.Object
  • io.vertx.core.eventbus.impl.clustered.Serializer.SerializerQueue

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final String
private boolean
private boolean
private final Queue<Serializer.SerializerQueue.SerializedTask<?>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv <U> void
add(Message<?> msg, BiConsumer<Message<?>, Promise<U>> selectHandler, Promise<U> promise)

pack-priv void
pack-priv void
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

addressback to summary
private final String address
closedback to summary
private boolean closed
runningback to summary
private boolean running
tasksback to summary
private final Queue<Serializer.SerializerQueue.SerializedTask<?>> tasks

Constructor Detail

SerializerQueueback to summary
pack-priv SerializerQueue(String address)

Method Detail

addback to summary
pack-priv <U> void add(Message<?> msg, BiConsumer<Message<?>, Promise<U>> selectHandler, Promise<U> promise)
checkPendingback to summary
pack-priv void checkPending()
closeback to summary
pack-priv void close()
processedback to summary
pack-priv void processed()
io.vertx.core.eventbus.impl.clustered back to summary

private Class Serializer.SerializerQueue.SerializedTask<U>

extends Object
implements Handler<AsyncResult<U>>
Class Inheritance
  • java.lang.Object
  • io.vertx.core.eventbus.impl.clustered.Serializer.SerializerQueue.SerializedTask
All Implemented Interfaces
io.vertx.core.Handler

Field Summary

Modifier and TypeField and Description
pack-priv final Promise<U>
pack-priv final Message<?>
pack-priv final BiConsumer<Message<?>, Promise<U>>

Constructor Summary

AccessConstructor and Description
pack-priv
SerializedTask(ContextInternal context, Message<?> msg, BiConsumer<Message<?>, Promise<U>> selectHandler)

Method Summary

Modifier and TypeMethod and Description
public void
handle(AsyncResult<U>
the event to handle
ar
)

Implements io.vertx.core.Handler.handle.

Something has happened, so handle it.

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

internalPromiseback to summary
pack-priv final Promise<U> internalPromise
msgback to summary
pack-priv final Message<?> msg
selectHandlerback to summary
pack-priv final BiConsumer<Message<?>, Promise<U>> selectHandler

Constructor Detail

SerializedTaskback to summary
pack-priv SerializedTask(ContextInternal context, Message<?> msg, BiConsumer<Message<?>, Promise<U>> selectHandler)

Method Detail

handleback to summary
public void handle(AsyncResult<U> ar)

Implements io.vertx.core.Handler.handle.

Doc from io.vertx.core.Handler.handle.

Something has happened, so handle it.

Parameters
ar:AsyncResult<U>

the event to handle

Annotations
@Override
processback to summary
pack-priv void process()