public interface SessionClient
| Modifier and Type | Interface and Description |
|---|---|
static class |
SessionClient.Builder
Partition proxy builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(EventType eventType,
Consumer<PrimitiveEvent> listener)
Adds an event listener.
|
void |
addStateChangeListener(Consumer<PrimitiveState> listener)
Registers a session state change listener.
|
CompletableFuture<Void> |
close()
Closes the proxy.
|
CompletableFuture<SessionClient> |
connect()
Connects the proxy.
|
io.atomix.utils.concurrent.ThreadContext |
context()
Returns the partition thread context.
|
CompletableFuture<byte[]> |
execute(PrimitiveOperation operation)
Executes an operation to the cluster.
|
PrimitiveState |
getState()
Returns the session state.
|
String |
name()
Returns the primitive name.
|
PartitionId |
partitionId()
Returns the partition identifier.
|
void |
removeEventListener(EventType eventType,
Consumer<PrimitiveEvent> listener)
Removes an event listener.
|
void |
removeStateChangeListener(Consumer<PrimitiveState> listener)
Removes a state change listener.
|
SessionId |
sessionId()
Returns the proxy session identifier.
|
PrimitiveType |
type()
Returns the client proxy type.
|
String name()
PrimitiveType type()
PrimitiveState getState()
SessionId sessionId()
PartitionId partitionId()
io.atomix.utils.concurrent.ThreadContext context()
CompletableFuture<byte[]> execute(PrimitiveOperation operation)
operation - the operation to executeNullPointerException - if operation is nullvoid addEventListener(EventType eventType, Consumer<PrimitiveEvent> listener)
eventType - the event type for which to add the listenerlistener - the event listener to addvoid removeEventListener(EventType eventType, Consumer<PrimitiveEvent> listener)
eventType - the event type for which to remove the listenerlistener - the event listener to removevoid 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<SessionClient> connect()
CompletableFuture<Void> close()
Copyright © 2013–2018. All rights reserved.