public class LogAggregatorWriterMultiPartitionextends Object
implements io.deephaven.enterprise.binlog.channels.ChannelManagerMultiPartition, io.deephaven.enterprise.binlog.support.MultiPartitionBufferWriter
Write binary rows to a log aggregation service. This implementation is for column partition values that are
determined dynamically (row-based).
After construction, this will contain zero or more authenticated and accepted connections to the LAS for the given identifiers.
If the channel connection is broken, attempts will be made to reconnect. Once either the client or server
requests/indicates termination, or the client initiates a terminating command, the appropriate connection(s) will be permanently
closed.
This object is expected to be used by a single thread.
Synchronization is to ensure that multiple commands don't occur at the same time, and to ensure that we don't close connections
while they are being checked.
Get a channel to the Log Aggregator Service based on the supplied column partition value. If necessary, create a
new one and initialize it with table identifiers and binary header.
Specified by:
getChannel in interface io.deephaven.enterprise.binlog.channels.ChannelManagerMultiPartition
Parameters:
columnPartitionValue - the column partition value
Returns:
non-null, open channel to the Log Aggregator Service, else an exception
Attempt to close all open channels. For each channel, send a CLIENT_FINISHED message, poll for an ACK, and close the channel.
If an IOException occurs on one or more channels, the first one will be rethrown, but the operation will still be
attempted on all remaining channels. If an exception occurs that is not an IOException, that exception will
be thrown and operations on remaining channels will not be attempted.
Specified by:
close in interface io.deephaven.enterprise.binlog.channels.ChannelManager
Specified by:
close in interface io.deephaven.enterprise.binlog.support.MultiPartitionBufferWriter
Close the specified column partition value's channel. If there is no partition for the specified column partition
value, then nothing is done.
Send CLIENT_FINISHED message, poll for an ACK and close the channel for the specified column partition value.
Attempt to flush all channels.
If an IOException occurs on one or more channels, the first one will be rethrown, but the operation will still be
attempted on all remaining channels. If an exception occurs that is not an IOException, that exception will
be thrown and operations on remaining channels will not be attempted.
Specified by:
flush in interface io.deephaven.enterprise.binlog.channels.ChannelManager
Send a command message to the Log Aggregator Service for the specified column partition value, requesting that the specified partition be deleted.
The connection will be closed by the server, no further data or commands are allowed.
Provide a way for clients to check the status of the specified column partition's writer. The server can
unilaterally close the socket, as when it encounters an error.
If there isn't a current open channel for the specified column partition value, this will throw an exception.