public interface ProxySession<S>
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
accept(Consumer<S> operation)
Submits an empty operation to the given partition.
|
void |
addStateChangeListener(Consumer<PrimitiveState> listener)
Registers a session state change listener.
|
<R> CompletableFuture<R> |
apply(Function<S,R> operation)
Submits an empty operation to the given partition.
|
CompletableFuture<Void> |
close()
Closes the proxy session.
|
CompletableFuture<ProxySession<S>> |
connect()
Connects the proxy session.
|
io.atomix.utils.concurrent.ThreadContext |
context()
Returns the session thread context.
|
PrimitiveState |
getState()
Returns the session state.
|
String |
name()
Returns the primitive name.
|
void |
register(Object client)
Registers a client listener.
|
void |
removeStateChangeListener(Consumer<PrimitiveState> listener)
Removes a state change listener.
|
PrimitiveType |
type()
Returns the client proxy type.
|
String name()
PrimitiveType type()
io.atomix.utils.concurrent.ThreadContext context()
PrimitiveState getState()
void register(Object client)
client - the client listener to registerCompletableFuture<Void> accept(Consumer<S> operation)
operation - the operation identifierPrimitiveOperation submission futures that preceded it.NullPointerException - if operation is null<R> CompletableFuture<R> apply(Function<S,R> operation)
R - the operation result typeoperation - the operation identifierPrimitiveOperation submission futures that preceded it.NullPointerException - if operation is nullvoid addStateChangeListener(Consumer<PrimitiveState> listener)
listener - The callback to call when the session state changes.void removeStateChangeListener(Consumer<PrimitiveState> listener)
listener - the state change listener to removeCompletableFuture<ProxySession<S>> connect()
CompletableFuture<Void> close()
Copyright © 2013–2018. All rights reserved.