public class TCPChronicleChannel extends net.openhft.chronicle.core.io.AbstractCloseable implements InternalChronicleChannel
closedHere, DISABLE_DISCARD_WARNING, DISABLE_THREAD_SAFETY, STRICT_DISCARD_WARNING, WARN_NSMARSHALLABLE_IN_INTERN_SIZE| Constructor and Description |
|---|
TCPChronicleChannel(ChronicleChannelCfg channelCfg,
ChannelHeader headerOut,
SocketRegistry socketRegistry)
Initiator constructor
|
TCPChronicleChannel(SystemContext systemContext,
ChronicleChannelCfg channelCfg,
SocketChannel sc,
Function<ChannelHeader,ChannelHeader> replaceInHeader,
Function<ChannelHeader,ChannelHeader> replaceOutHeader)
Acceptor constructor
|
| Modifier and Type | Method and Description |
|---|---|
Wire |
acquireProducer()
Retrieves a producer instance associated with this channel.
|
DocumentContext |
acquireWritingDocument(boolean metaData)
Start or reuse an existing a DocumentContext, optionally call close() when done.
|
int |
bufferSize()
Returns the size of the buffer used by this channel.
|
ChronicleChannelCfg |
channelCfg()
Retrieves the configuration of the channel.
|
ChronicleChannelCfg |
connectionCfg() |
EventPoller |
eventPoller()
Retrieves the EventPoller instance associated with this channel.
|
ChronicleChannel |
eventPoller(EventPoller eventPoller)
Associates a given EventPoller instance with this channel.
|
ChannelHeader |
headerIn()
Retrieves the header for incoming messages.
|
ChannelHeader |
headerInToUse()
Returns the ChannelHeader to be used for incoming data.
|
ChannelHeader |
headerOut()
Retrieves the header for outgoing messages.
|
long |
lastTestMessage()
Retrieves the highest timestamp received from the test messages.
|
protected void |
performClose() |
DocumentContext |
readingDocument() |
boolean |
recordHistory() |
void |
releaseProducer()
Releases the producer instance previously acquired with acquireProducer().
|
boolean |
supportsEventPoller()
Determines if the current channel supports the EventPoller mechanism for polling events.
|
void |
testMessage(long now)
Sends a test message using a monotonically increasing timestamp, enabling the caller to wait for a response via lastTestMessage().
|
DocumentContext |
writingDocument(boolean metaData)
Start a new DocumentContext, must always call close() when done.
|
assertCloseable, assertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, disableThreadSafetyCheck, disableThreadSafetyCheck, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, singleThreadedCheckDisabled, singleThreadedCheckDisabled, singleThreadedCheckReset, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, toString, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiteventHandlerAsRunnable, newChannel, readOneclose, closeQuietly, closeQuietlybuilder, methodWriter, methodWriter, methodWriterBuilder, methodWriterBuilder, writeBytes, writeDocument, writeDocument, writeMap, writeMessage, writeMessage, writeText, writingDocumentmethodReader, methodReaderBuilder, readBytes, readBytes, readDocument, readMap, readText, readTextpublic TCPChronicleChannel(ChronicleChannelCfg channelCfg, ChannelHeader headerOut, SocketRegistry socketRegistry) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptionpublic TCPChronicleChannel(SystemContext systemContext, ChronicleChannelCfg channelCfg, SocketChannel sc, Function<ChannelHeader,ChannelHeader> replaceInHeader, Function<ChannelHeader,ChannelHeader> replaceOutHeader)
public ChronicleChannelCfg channelCfg()
ChronicleChannelchannelCfg in interface ChronicleChannelpublic DocumentContext readingDocument() throws net.openhft.chronicle.core.io.ClosedIORuntimeException
readingDocument in interface MarshallableInnet.openhft.chronicle.core.io.ClosedIORuntimeExceptionprotected void performClose()
performClose in class net.openhft.chronicle.core.io.AbstractCloseablepublic ChannelHeader headerOut()
ChronicleChannelheaderOut in interface ChronicleChannelpublic ChannelHeader headerIn()
ChronicleChannelheaderIn in interface ChronicleChannelpublic ChannelHeader headerInToUse()
InternalChronicleChannelheaderInToUse in interface InternalChronicleChannelpublic DocumentContext writingDocument(boolean metaData) throws UnrecoverableTimeoutException
MarshallableOutwritingDocument in interface DocumentWrittenwritingDocument in interface MarshallableOutUnrecoverableTimeoutExceptionpublic ChronicleChannelCfg connectionCfg()
public void testMessage(long now)
ChronicleChanneltestMessage in interface ChronicleChannelnow - a monotonically increasing timestamppublic long lastTestMessage()
ChronicleChannellastTestMessage in interface ChronicleChannelpublic DocumentContext acquireWritingDocument(boolean metaData) throws UnrecoverableTimeoutException
MarshallableOutacquireWritingDocument in interface DocumentWrittenacquireWritingDocument in interface MarshallableOutUnrecoverableTimeoutExceptionpublic boolean supportsEventPoller()
InternalChronicleChannelsupportsEventPoller in interface InternalChronicleChannelpublic EventPoller eventPoller()
InternalChronicleChanneleventPoller in interface InternalChronicleChannelpublic ChronicleChannel eventPoller(EventPoller eventPoller)
InternalChronicleChanneleventPoller in interface InternalChronicleChanneleventPoller - the EventPoller instance to associate with this channel.public Wire acquireProducer()
InternalChronicleChannelacquireProducer in interface InternalChronicleChannelpublic void releaseProducer()
InternalChronicleChannelreleaseProducer in interface InternalChronicleChannelpublic int bufferSize()
InternalChronicleChannelbufferSize in interface InternalChronicleChannelpublic boolean recordHistory()
recordHistory in interface MarshallableOutCopyright © 2023. All rights reserved.