Interface ConnectionPool

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

    public interface ConnectionPool
    extends java.lang.AutoCloseable
    This represents a ConnectionPool that manages the actual network connections to different SegmentStore instances.
    • Method Detail

      • getClientConnection

        java.util.concurrent.CompletableFuture<ClientConnection> getClientConnection​(Flow flow,
                                                                                     io.pravega.shared.protocol.netty.PravegaNodeUri uri,
                                                                                     io.pravega.shared.protocol.netty.ReplyProcessor rp)
        This is used to create a ClientConnection on an existing Connection pool. The Connection pool implementation decides if a new connection needs to be established to the PravegaNode or an existing connection can be reused to establish the connection.
        Parameters:
        flow - Flow
        uri - The Pravega Node Uri.
        rp - ReplyProcessor instance.
        Returns:
        An instance of client connection.
      • getClientConnection

        java.util.concurrent.CompletableFuture<ClientConnection> getClientConnection​(io.pravega.shared.protocol.netty.PravegaNodeUri uri,
                                                                                     io.pravega.shared.protocol.netty.ReplyProcessor rp)
        This is used to create a ClientConnection where flows are disabled. This implies that only one ClientConnection can exist on the underlying connection.
        Parameters:
        uri - The Pravega Node Uri.
        rp - ReplyProcessor 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 executor.