Interface ConnectionFactory

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    SocketConnectionFactoryImpl

    public interface ConnectionFactory
    extends java.lang.AutoCloseable
    A factory that establishes connections to Pravega servers. The underlying implementation may or may not implement connection pooling.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()  
      java.util.concurrent.CompletableFuture<ClientConnection> establishConnection​(io.pravega.shared.protocol.netty.PravegaNodeUri endpoint, io.pravega.shared.protocol.netty.ReplyProcessor rp)
      Establishes a connection between server and client with given parameters.
      java.util.concurrent.ScheduledExecutorService getInternalExecutor()
      Returns the client-internal thread pool for background tasks.
    • Method Detail

      • establishConnection

        java.util.concurrent.CompletableFuture<ClientConnection> establishConnection​(io.pravega.shared.protocol.netty.PravegaNodeUri endpoint,
                                                                                     io.pravega.shared.protocol.netty.ReplyProcessor rp)
        Establishes a connection between server and client with given parameters.
        Parameters:
        endpoint - The Pravega Node URI.
        rp - Reply Processor instance.
        Returns:
        An instance of client connection.
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getInternalExecutor

        java.util.concurrent.ScheduledExecutorService getInternalExecutor()
        Returns the client-internal thread pool for background tasks.