@Deprecated public final class TcpChannelHub extends net.openhft.chronicle.core.io.AbstractCloseable
| Modifier and Type | Class and Description |
|---|---|
static interface |
TcpChannelHub.Task
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
TCP_BUFFER
Deprecated.
Use
NetworkUtil.TCP_BUFFER_SIZE instead |
static int |
TCP_SAFE_SIZE
Deprecated.
Use
NetworkUtil.TCP_SAFE_SIZE instead |
static boolean |
TCP_USE_PADDING
Deprecated.
Use
NetworkUtil.TCP_USE_PADDING instead |
| Constructor and Description |
|---|
TcpChannelHub(@Nullable SessionProvider sessionProvider,
@NotNull net.openhft.chronicle.core.threads.EventLoop eventLoop,
@NotNull net.openhft.chronicle.wire.WireType wireType,
@NotNull String name,
@NotNull SocketAddressSupplier socketAddressSupplier,
boolean shouldSendCloseMessage,
@Nullable ClientConnectionMonitor clientConnectionMonitor,
@NotNull net.openhft.chronicle.core.threads.HandlerPriority monitor,
@NotNull ConnectionStrategy connectionStrategy)
Deprecated.
|
TcpChannelHub(@Nullable SessionProvider sessionProvider,
@NotNull net.openhft.chronicle.core.threads.EventLoop eventLoop,
@NotNull net.openhft.chronicle.wire.WireType wireType,
@NotNull String name,
@NotNull SocketAddressSupplier socketAddressSupplier,
boolean shouldSendCloseMessage,
@Nullable ClientConnectionMonitor clientConnectionMonitor,
@NotNull net.openhft.chronicle.core.threads.HandlerPriority monitor,
@NotNull ConnectionStrategy connectionStrategy,
@Nullable Supplier<net.openhft.chronicle.threads.Pauser> pauserSupplier)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
assertAllHubsClosed()
Deprecated.
|
void |
checkConnection()
Deprecated.
blocks until there is a connection
|
static void |
closeAllHubs()
Deprecated.
|
void |
forceDisconnect()
Deprecated.
you are unlikely to want to call this method in a production environment the purpose of this method is to simulate a network outage
|
boolean |
isOpen()
Deprecated.
|
boolean |
isOutBytesEmpty()
Deprecated.
|
boolean |
lock(@NotNull TcpChannelHub.Task r)
Deprecated.
|
boolean |
lock2(@NotNull TcpChannelHub.Task r,
boolean reconnectOnFailure,
@NotNull TryLock tryLock)
Deprecated.
|
long |
nextUniqueTransaction(long timeMs)
Deprecated.
the transaction id are generated as unique timestamps
|
@NotNull ReentrantLock |
outBytesLock()
Deprecated.
|
net.openhft.chronicle.wire.Wire |
outWire()
Deprecated.
|
protected void |
performClose()
Deprecated.
called when we are finished with using the TcpChannelHub
|
void |
preventSubscribeUponReconnect(long tid)
Deprecated.
prevents subscriptions upon reconnect for the following
tid its useful to call this method when an unsubscribe has been sent to the
server, but before the server has acknoleged the unsubscribe, hence, perverting a resubscribe upon reconnection. |
net.openhft.chronicle.wire.Wire |
proxyReply(long timeoutTime,
long tid)
Deprecated.
blocks for a message with the appropriate
tid |
static void |
setTcpNoDelay(Socket socket,
boolean tcpNoDelay)
Deprecated.
|
void |
subscribe(@NotNull net.openhft.chronicle.network.connection.AsyncSubscription asyncSubscription)
Deprecated.
sets up subscriptions with the server, even if the socket connection is down, the subscriptions will be re-establish with the server
automatically once it comes back up.
|
@NotNull String |
toString()
Deprecated.
|
void |
unsubscribe(long tid)
Deprecated.
closes a subscription established by
net.openhft.chronicle.network.connection.TcpChannelHub#
subscribe(net.openhft.chronicle.network.connection.AsyncSubscription) |
void |
writeAsyncHeader(@NotNull net.openhft.chronicle.wire.Wire wire,
String csp,
long cid)
Deprecated.
The writes the meta data to wire - the async version does not contain the tid
|
void |
writeMetaDataForKnownTID(long tid,
@NotNull net.openhft.chronicle.wire.Wire wire,
@Nullable String csp,
long cid,
boolean closeMessage)
Deprecated.
|
long |
writeMetaDataStartTime(long startTime,
@NotNull net.openhft.chronicle.wire.Wire wire,
String csp,
long cid)
Deprecated.
|
void |
writeSocket(@NotNull net.openhft.chronicle.wire.WireOut wire,
boolean reconnectOnFailure,
boolean sessionMessage)
Deprecated.
sends data to the server via TCP/IP
|
assertCloseable, assertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, disableThreadSafetyCheck, disableThreadSafetyCheck, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, singleThreadedCheckDisabled, singleThreadedCheckDisabled, singleThreadedCheckReset, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait@Deprecated public static final int TCP_BUFFER
NetworkUtil.TCP_BUFFER_SIZE instead@Deprecated public static final int TCP_SAFE_SIZE
NetworkUtil.TCP_SAFE_SIZE instead@Deprecated public static final boolean TCP_USE_PADDING
NetworkUtil.TCP_USE_PADDING insteadpublic TcpChannelHub(@Nullable
@Nullable SessionProvider sessionProvider,
@NotNull
@NotNull net.openhft.chronicle.core.threads.EventLoop eventLoop,
@NotNull
@NotNull net.openhft.chronicle.wire.WireType wireType,
@NotNull
@NotNull String name,
@NotNull
@NotNull SocketAddressSupplier socketAddressSupplier,
boolean shouldSendCloseMessage,
@Nullable
@Nullable ClientConnectionMonitor clientConnectionMonitor,
@NotNull
@NotNull net.openhft.chronicle.core.threads.HandlerPriority monitor,
@NotNull
@NotNull ConnectionStrategy connectionStrategy)
public TcpChannelHub(@Nullable
@Nullable SessionProvider sessionProvider,
@NotNull
@NotNull net.openhft.chronicle.core.threads.EventLoop eventLoop,
@NotNull
@NotNull net.openhft.chronicle.wire.WireType wireType,
@NotNull
@NotNull String name,
@NotNull
@NotNull SocketAddressSupplier socketAddressSupplier,
boolean shouldSendCloseMessage,
@Nullable
@Nullable ClientConnectionMonitor clientConnectionMonitor,
@NotNull
@NotNull net.openhft.chronicle.core.threads.HandlerPriority monitor,
@NotNull
@NotNull ConnectionStrategy connectionStrategy,
@Nullable
@Nullable Supplier<net.openhft.chronicle.threads.Pauser> pauserSupplier)
public static void assertAllHubsClosed()
public static void closeAllHubs()
public static void setTcpNoDelay(Socket socket, boolean tcpNoDelay) throws SocketException
SocketExceptionpublic void preventSubscribeUponReconnect(long tid)
tid its useful to call this method when an unsubscribe has been sent to the
server, but before the server has acknoleged the unsubscribe, hence, perverting a resubscribe upon reconnection.tid - unique transaction id@NotNull public @NotNull String toString()
toString in class net.openhft.chronicle.core.io.AbstractCloseablepublic void subscribe(@NotNull
@NotNull net.openhft.chronicle.network.connection.AsyncSubscription asyncSubscription)
net.openhft.chronicle.network.connection.TcpChannelHub#unsubscribe(long)asyncSubscription - detail of the subscription that you wish to hold with the serverpublic void unsubscribe(long tid)
net.openhft.chronicle.network.connection.TcpChannelHub#
subscribe(net.openhft.chronicle.network.connection.AsyncSubscription)tid - the unique id of this subscription@NotNull public @NotNull ReentrantLock outBytesLock()
public boolean isOpen()
protected void performClose()
performClose in class net.openhft.chronicle.core.io.AbstractCloseablepublic long nextUniqueTransaction(long timeMs)
timeMs - in millisecondspublic void writeSocket(@NotNull
@NotNull net.openhft.chronicle.wire.WireOut wire,
boolean reconnectOnFailure,
boolean sessionMessage)
wire - the wire containing the outbound datapublic net.openhft.chronicle.wire.Wire proxyReply(long timeoutTime,
long tid)
throws net.openhft.chronicle.bytes.ConnectionDroppedException,
TimeoutException
tidtimeoutTime - the amount of time to wait ( in MS ) before a time out exceptionstid - the tid of the message that we are waiting fortidnet.openhft.chronicle.bytes.ConnectionDroppedExceptionTimeoutExceptionpublic net.openhft.chronicle.wire.Wire outWire()
public long writeMetaDataStartTime(long startTime,
@NotNull
@NotNull net.openhft.chronicle.wire.Wire wire,
String csp,
long cid)
public void writeMetaDataForKnownTID(long tid,
@NotNull
@NotNull net.openhft.chronicle.wire.Wire wire,
@Nullable
@Nullable String csp,
long cid,
boolean closeMessage)
public void writeAsyncHeader(@NotNull
@NotNull net.openhft.chronicle.wire.Wire wire,
String csp,
long cid)
wire - the wire that we will write tocsp - provide either the csp or the cidcid - provide either the csp or the cidpublic boolean lock(@NotNull
@NotNull TcpChannelHub.Task r)
public boolean lock2(@NotNull
@NotNull TcpChannelHub.Task r,
boolean reconnectOnFailure,
@NotNull
@NotNull TryLock tryLock)
public void checkConnection()
public void forceDisconnect()
public boolean isOutBytesEmpty()
Copyright © 2023. All rights reserved.