Package com.clickhouse.client
Class AbstractSocketClient
java.lang.Object
com.clickhouse.client.AbstractSocketClient
- All Implemented Interfaces:
AutoCloseable
Deprecated.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.AbstractSocketClient(ClickHouseConfig config) Deprecated.AbstractSocketClient(ClickHouseNode server) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.connect(ClickHouseNode server) Deprecated.connect(InetSocketAddress address) Deprecated.static final ClickHouseSocketFactorygetCustomSocketFactory(String className, ClickHouseSocketFactory defaultFactory, Class<?> forClass) Deprecated.protected SocketChannelDeprecated.booleanisActive()Deprecated.booleanDeprecated.Deprecated.protected voidonConnect(ClickHouseConfig config, SocketChannel channel) Deprecated.protected booleanonRead(ClickHouseConfig config, SocketChannel sc, ClickHouseOutputStream out) Deprecated.Reads byte from socket input buffer.protected longonWrite(ClickHouseConfig config, SocketChannel sc, ClickHouseInputStream in, long startPosition) Deprecated.protected CompletableFuture<Boolean>processRequest(ClickHouseConfig config, ClickHouseInputStream in, ClickHouseOutputStream out) Deprecated.Deprecated.protected final voidremoveInterestOp(int op) Deprecated.send(ClickHouseConfig config, ClickHouseInputStream rawRequest) Deprecated.voidsend(ClickHouseConfig config, ClickHouseInputStream rawRequest, ClickHouseOutputStream responseStream) Deprecated.protected final voidsetInterestOp(int op) Deprecated.static final SocketsetSocketOptions(ClickHouseConfig config, Socket socket) Deprecated.Sets socket options.static final SocketChannelsetSocketOptions(ClickHouseConfig config, SocketChannel socket) Deprecated.Sets socket options.protected booleanstart()Deprecated.
-
Field Details
-
ERROR_INVALID_INPUT_STREAM
Deprecated.- See Also:
-
ERROR_INVALID_OUTPUT_STREAM
Deprecated.- See Also:
-
ERROR_READ_TIMEOUT
Deprecated.- See Also:
-
ERROR_WRITE_TIMEOUT
Deprecated.- See Also:
-
-
Constructor Details
-
AbstractSocketClient
Deprecated.- Throws:
IOException
-
AbstractSocketClient
Deprecated.- Throws:
IOException
-
AbstractSocketClient
Deprecated.- Throws:
IOException
-
-
Method Details
-
getCustomSocketFactory
public static final ClickHouseSocketFactory getCustomSocketFactory(String className, ClickHouseSocketFactory defaultFactory, Class<?> forClass) Deprecated. -
setSocketOptions
public static final Socket setSocketOptions(ClickHouseConfig config, Socket socket) throws SocketException Deprecated.Sets socket options. May be called at any time(e.g. before or even after the socket is bound or connected).- Parameters:
config- non-null configurationsocket- non-null socket- Returns:
- the given socket
- Throws:
SocketException- when there's error setting socket options
-
setSocketOptions
public static final SocketChannel setSocketOptions(ClickHouseConfig config, SocketChannel socket) throws IOException Deprecated.Sets socket options. May be called at any time(e.g. before or even after the socket is bound or connected).- Parameters:
config- non-null configurationsocket- non-null socket channel- Returns:
- the given socket channel
- Throws:
IOException- when there's error setting socket options
-
getSocketChannel
Deprecated. -
processRequest
protected CompletableFuture<Boolean> processRequest(ClickHouseConfig config, ClickHouseInputStream in, ClickHouseOutputStream out) throws IOException Deprecated.- Throws:
IOException
-
setInterestOp
protected final void setInterestOp(int op) Deprecated. -
removeInterestOp
protected final void removeInterestOp(int op) Deprecated. -
onConnect
Deprecated.- Throws:
IOException
-
onRead
protected boolean onRead(ClickHouseConfig config, SocketChannel sc, ClickHouseOutputStream out) throws IOException Deprecated.Reads byte from socket input buffer.- Parameters:
config- non-null configurationsc- socket channelout- output stream- Returns:
- true if the read was a success; false otherwise
- Throws:
IOException
-
onWrite
protected long onWrite(ClickHouseConfig config, SocketChannel sc, ClickHouseInputStream in, long startPosition) throws IOException Deprecated.- Throws:
IOException
-
start
Deprecated.- Throws:
IOException
-
connect
Deprecated.- Throws:
IOException
-
connect
Deprecated.- Throws:
IOException
-
isActive
public boolean isActive()Deprecated. -
isShutdown
public boolean isShutdown()Deprecated. -
localAddress
Deprecated.- Throws:
IOException
-
remoteAddress
Deprecated.- Throws:
IOException
-
send
public ClickHouseInputStream send(ClickHouseConfig config, ClickHouseInputStream rawRequest) throws IOException Deprecated.- Throws:
IOException
-
send
public void send(ClickHouseConfig config, ClickHouseInputStream rawRequest, ClickHouseOutputStream responseStream) throws IOException Deprecated.- Throws:
IOException
-
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-