Class AccessLoggerManager
java.lang.Object
org.infinispan.server.resp.logging.AccessLoggerManager
- All Implemented Interfaces:
IntConsumer
Handle the access log.
Keeps track of pending operations and pushes them to the access log. Some operations are not flushed directly
because of the pipelining, so the manager keeps them with ChannelProgressivePromise
. Once the buffer is
flushed, the ChannelProgressivePromise
advances the indexes and flushes the pending operations to the
access log.
The manager tracks data of only one active operation at a time. The current active operation is then flushed or
registered to do so later. This approach fits with the way we handle the commands on the
RespHandler
.
Thread safety: This implementation is not thread-safe. It assumes all invocations come from the same thread to track, register, and flush operations.
- Since:
- 15.0
-
Constructor Summary
ConstructorsConstructorDescriptionAccessLoggerManager
(io.netty.channel.ChannelHandlerContext ctx, TimeService timeService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(int value) void
close()
void
flush
(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelFuture future, CompletionStage<?> pending) void
register
(CompletionStage<?> res) void
track
(RespCommand req, List<byte[]> arguments) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.IntConsumer
andThen
-
Constructor Details
-
AccessLoggerManager
-
-
Method Details
-
track
-
flush
public void flush(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelFuture future, CompletionStage<?> pending) -
register
-
close
public void close() -
accept
public void accept(int value) - Specified by:
accept
in interfaceIntConsumer
-