Package io.aeron.cluster.client
Class AeronCluster.AsyncConnect
java.lang.Object
io.aeron.cluster.client.AeronCluster.AsyncConnect
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- AeronCluster
Allows for the async establishment of a cluster session.
poll() should be called repeatedly until
it returns a non-null value with the new AeronCluster client. On error close() should be called
to clean up allocated resources.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents connection state. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close allocated resources.poll()Poll to advance steps in the connection until complete or error.state()Get the current connection state.intstep()Indicates which step in the connect process has been reached.static StringstepName(int step) Get the String representation of a step in the connect process.
-
Method Details
-
close
public void close()Close allocated resources. Must be called on error. On success this is a no op.- Specified by:
closein interfaceAutoCloseable
-
step
public int step()Indicates which step in the connect process has been reached.- Returns:
- which step in the connect process has reached.
-
state
Get the current connection state.- Returns:
- current state.
-
stepName
Get the String representation of a step in the connect process.- Parameters:
step- to get the string representation for.- Returns:
- the String representation of a step in the connect process.
- See Also:
-
poll
Poll to advance steps in the connection until complete or error.- Returns:
- null if not yet complete then
AeronClusterwhen complete.
-