Class AccessLoggerManager

java.lang.Object
org.infinispan.server.resp.logging.AccessLoggerManager
All Implemented Interfaces:
IntConsumer

public class AccessLoggerManager extends Object implements 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 Details

    • AccessLoggerManager

      public AccessLoggerManager(io.netty.channel.ChannelHandlerContext ctx, TimeService timeService)
  • Method Details

    • track

      public void track(RespCommand req, List<byte[]> arguments)
    • flush

      public void flush(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelFuture future, CompletionStage<?> pending)
    • register

      public void register(CompletionStage<?> res)
    • close

      public void close()
    • accept

      public void accept(int value)
      Specified by:
      accept in interface IntConsumer