Class BinlogHelper.SinkWriterImpl
java.lang.Object
io.grpc.protobuf.services.BinlogHelper.SinkWriter
io.grpc.protobuf.services.BinlogHelper.SinkWriterImpl
- Enclosing class:
BinlogHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final BinaryLogSinkprivate BinlogHelper.TimeProvider -
Constructor Summary
ConstructorsConstructorDescriptionSinkWriterImpl(BinaryLogSink sink, BinlogHelper.TimeProvider timeProvider, int maxHeaderBytes, int maxMessageBytes) -
Method Summary
Modifier and TypeMethodDescription(package private) intReturns the number bytes of the header this writer will log, according to configuration.(package private) intReturns the number bytes of the message this writer will log, according to configuration.(package private) voidlogCancel(long seq, GrpcLogEntry.Logger logger, long callId) Logs the cancellation.(package private) voidlogClientHeader(long seq, String methodName, String authority, com.google.protobuf.Duration timeout, Metadata metadata, GrpcLogEntry.Logger logger, long callId, SocketAddress peerAddress) Logs the client header.(package private) voidlogHalfClose(long seq, GrpcLogEntry.Logger logger, long callId) (package private) <T> voidlogRpcMessage(long seq, GrpcLogEntry.EventType eventType, MethodDescriptor.Marshaller<T> marshaller, T message, GrpcLogEntry.Logger logger, long callId) Logs the message message.(package private) voidlogServerHeader(long seq, Metadata metadata, GrpcLogEntry.Logger logger, long callId, SocketAddress peerAddress) Logs the server header.(package private) voidlogTrailer(long seq, Status status, Metadata metadata, GrpcLogEntry.Logger logger, long callId, SocketAddress peerAddress) Logs the server trailer.(package private) GrpcLogEntry.Builder
-
Field Details
-
sink
-
timeProvider
-
maxHeaderBytes
private final int maxHeaderBytes -
maxMessageBytes
private final int maxMessageBytes
-
-
Constructor Details
-
SinkWriterImpl
SinkWriterImpl(BinaryLogSink sink, BinlogHelper.TimeProvider timeProvider, int maxHeaderBytes, int maxMessageBytes)
-
-
Method Details
-
newTimestampedBuilder
GrpcLogEntry.Builder newTimestampedBuilder() -
logClientHeader
void logClientHeader(long seq, String methodName, @Nullable String authority, @Nullable com.google.protobuf.Duration timeout, Metadata metadata, GrpcLogEntry.Logger logger, long callId, @Nullable SocketAddress peerAddress) Description copied from class:BinlogHelper.SinkWriterLogs the client header. This method logs the appropriate number of bytes as determined by the binary logging configuration.- Specified by:
logClientHeaderin classBinlogHelper.SinkWriter
-
logServerHeader
void logServerHeader(long seq, Metadata metadata, GrpcLogEntry.Logger logger, long callId, @Nullable SocketAddress peerAddress) Description copied from class:BinlogHelper.SinkWriterLogs the server header. This method logs the appropriate number of bytes as determined by the binary logging configuration.- Specified by:
logServerHeaderin classBinlogHelper.SinkWriter
-
logTrailer
void logTrailer(long seq, Status status, Metadata metadata, GrpcLogEntry.Logger logger, long callId, @Nullable SocketAddress peerAddress) Description copied from class:BinlogHelper.SinkWriterLogs the server trailer. This method logs the appropriate number of bytes as determined by the binary logging configuration.- Specified by:
logTrailerin classBinlogHelper.SinkWriter
-
logRpcMessage
<T> void logRpcMessage(long seq, GrpcLogEntry.EventType eventType, MethodDescriptor.Marshaller<T> marshaller, T message, GrpcLogEntry.Logger logger, long callId) Description copied from class:BinlogHelper.SinkWriterLogs the message message. The number of bytes logged is determined by the binary logging configuration.- Specified by:
logRpcMessagein classBinlogHelper.SinkWriter
-
logHalfClose
- Specified by:
logHalfClosein classBinlogHelper.SinkWriter
-
logCancel
Description copied from class:BinlogHelper.SinkWriterLogs the cancellation.- Specified by:
logCancelin classBinlogHelper.SinkWriter
-
getMaxHeaderBytes
int getMaxHeaderBytes()Description copied from class:BinlogHelper.SinkWriterReturns the number bytes of the header this writer will log, according to configuration.- Specified by:
getMaxHeaderBytesin classBinlogHelper.SinkWriter
-
getMaxMessageBytes
int getMaxMessageBytes()Description copied from class:BinlogHelper.SinkWriterReturns the number bytes of the message this writer will log, according to configuration.- Specified by:
getMaxMessageBytesin classBinlogHelper.SinkWriter
-