@FunctionalInterface public interface ConnectionStrategy extends net.openhft.chronicle.wire.Marshallable
| Modifier and Type | Method and Description |
|---|---|
SocketChannel |
connect(String name,
SocketAddressSupplier socketAddressSupplier,
NetworkStatsListener<? extends NetworkContext> networkStatsListener,
boolean didLogIn,
FatalFailureMonitor fatalFailureMonitor) |
default SocketChannel |
openSocketChannel(InetSocketAddress socketAddress,
int tcpBufferSize,
long timeoutMs) |
default SocketChannel |
openSocketChannel(InetSocketAddress socketAddress,
int tcpBufferSize,
long timeoutMs,
int socketConnectionTimeoutMs)
the reason for this method is that unlike the selector it uses tick time
|
default long |
pauseMillisBeforeReconnect()
allows control of a backoff strategy
|
static SocketChannel |
socketChannel(InetSocketAddress socketAddress,
int tcpBufferSize,
int socketConnectionTimeoutMs) |
$equals, $fieldInfos, $hashCode, $toString, copyFrom, copyTo, deepCopy, fromFile, fromFile, fromFileAsMap, fromFileAsMap, fromHexString, fromString, fromString, getClassName, getField, mergeToMap, readMarshallable, reset, setField, streamFromFile, streamFromFile, writeMarshallable@Nullable static SocketChannel socketChannel(@NotNull InetSocketAddress socketAddress, int tcpBufferSize, int socketConnectionTimeoutMs) throws IOException
IOExceptionSocketChannel connect(@NotNull String name, @NotNull SocketAddressSupplier socketAddressSupplier, @Nullable NetworkStatsListener<? extends NetworkContext> networkStatsListener, boolean didLogIn, @NotNull FatalFailureMonitor fatalFailureMonitor) throws InterruptedException
name - the name of the connection, only used for loggingsocketAddressSupplier - networkStatsListener - didLogIn - was the last attempt successfull, was a login establishedfatalFailureMonitor - InterruptedException@Nullable default SocketChannel openSocketChannel(@NotNull InetSocketAddress socketAddress, int tcpBufferSize, long timeoutMs) throws IOException, InterruptedException
IOExceptionInterruptedException@Nullable default SocketChannel openSocketChannel(@NotNull InetSocketAddress socketAddress, int tcpBufferSize, long timeoutMs, int socketConnectionTimeoutMs) throws IOException, InterruptedException
IOExceptionInterruptedExceptiondefault long pauseMillisBeforeReconnect()
Copyright © 2018. All rights reserved.