Class SocketConnectionFactoryImpl
- java.lang.Object
-
- io.pravega.client.connection.impl.SocketConnectionFactoryImpl
-
- All Implemented Interfaces:
ConnectionFactory,java.lang.AutoCloseable
public class SocketConnectionFactoryImpl extends java.lang.Object implements ConnectionFactory
-
-
Constructor Summary
Constructors Constructor Description SocketConnectionFactoryImpl(ClientConfig clientConfig)SocketConnectionFactoryImpl(ClientConfig clientConfig, java.lang.Integer numThreadsInPool)SocketConnectionFactoryImpl(ClientConfig clientConfig, java.util.concurrent.ScheduledExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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.ScheduledExecutorServicegetInternalExecutor()Returns the client-internal thread pool for background tasks.intgetOpenSocketCount()
-
-
-
Constructor Detail
-
SocketConnectionFactoryImpl
public SocketConnectionFactoryImpl(ClientConfig clientConfig)
-
SocketConnectionFactoryImpl
public SocketConnectionFactoryImpl(ClientConfig clientConfig, java.lang.Integer numThreadsInPool)
-
SocketConnectionFactoryImpl
public SocketConnectionFactoryImpl(ClientConfig clientConfig, java.util.concurrent.ScheduledExecutorService executor)
-
-
Method Detail
-
establishConnection
public java.util.concurrent.CompletableFuture<ClientConnection> establishConnection(io.pravega.shared.protocol.netty.PravegaNodeUri endpoint, io.pravega.shared.protocol.netty.ReplyProcessor rp)
Description copied from interface:ConnectionFactoryEstablishes a connection between server and client with given parameters.- Specified by:
establishConnectionin interfaceConnectionFactory- Parameters:
endpoint- The Pravega Node URI.rp- Reply Processor instance.- Returns:
- An instance of client connection.
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceConnectionFactory
-
getOpenSocketCount
public int getOpenSocketCount()
-
getInternalExecutor
public java.util.concurrent.ScheduledExecutorService getInternalExecutor()
Description copied from interface:ConnectionFactoryReturns the client-internal thread pool for background tasks.- Specified by:
getInternalExecutorin interfaceConnectionFactory
-
-