Interface ConnectionPool
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
ConnectionPoolImpl
public interface ConnectionPool extends java.lang.AutoCloseableThis represents a ConnectionPool that manages the actual network connections to different SegmentStore instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()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 aClientConnectionon an existing Connection pool.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 aClientConnectionwhere flows are disabled.java.util.concurrent.ScheduledExecutorServicegetInternalExecutor()Returns the client internal thread pool executor.
-
-
-
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 aClientConnectionon 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- Flowuri- 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 aClientConnectionwhere 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:
closein interfacejava.lang.AutoCloseable
-
getInternalExecutor
java.util.concurrent.ScheduledExecutorService getInternalExecutor()
Returns the client internal thread pool executor.
-
-