Class AeronCluster.AsyncConnect

java.lang.Object
io.aeron.cluster.client.AeronCluster.AsyncConnect
All Implemented Interfaces:
AutoCloseable
Enclosing class:
AeronCluster

public static final class AeronCluster.AsyncConnect extends Object implements AutoCloseable
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.
  • Method Details

    • close

      public void close()
      Close allocated resources. Must be called on error. On success this is a no op.
      Specified by:
      close in interface AutoCloseable
    • 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

      public static String stepName(int step)
      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

      public AeronCluster poll()
      Poll to advance steps in the connection until complete or error.
      Returns:
      null if not yet complete then AeronCluster when complete.