MessageTracker (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.util

## Class MessageTracker

- java.lang.Object
- - org.apache.zookeeper.server.util.MessageTracker

-     public class MessageTracker
      extends Object

  This class provides a way of buffering sentBuffer and receivedBuffer messages in order. It uses EvictingQueue of size BUFFERED_MESSAGE_SIZE to store the messages. When the queue is full it overrides the oldest in a circular manner. This class does doe not provide thread safety.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BUFFERED_MESSAGE_SIZE`
    `static String` | `MESSAGE_TRACKER_BUFFER_SIZE`
    `static String` | `MESSAGE_TRACKER_ENABLED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageTracker(int buffer_size)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dumpToLog(String serverAddress)`
    `org.apache.zookeeper.server.util.MessageTracker.BufferedMessage` | `peekReceived()`
    `long` | `peekReceivedTimestamp()`
    `org.apache.zookeeper.server.util.MessageTracker.BufferedMessage` | `peekSent()`
    `long` | `peekSentTimestamp()`
    `void` | `trackReceived(int packetType)`
    `void` | `trackReceived(long timestamp)`
    `void` | `trackSent(int packetType)`
    `void` | `trackSent(long timestamp)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MESSAGE_TRACKER_BUFFER_SIZE

          public static final String MESSAGE_TRACKER_BUFFER_SIZE

      See Also:
        Constant Field Values

    - #### MESSAGE_TRACKER_ENABLED

          public static final String MESSAGE_TRACKER_ENABLED

      See Also:
        Constant Field Values

    - #### BUFFERED_MESSAGE_SIZE

          public static final int BUFFERED_MESSAGE_SIZE

  - ### Constructor Detail

    - #### MessageTracker

          public MessageTracker(int buffer_size)

  - ### Method Detail

    - #### trackSent

          public void trackSent(long timestamp)

    - #### trackSent

          public void trackSent(int packetType)

    - #### trackReceived

          public void trackReceived(long timestamp)

    - #### trackReceived

          public void trackReceived(int packetType)

    - #### peekSent

          public final org.apache.zookeeper.server.util.MessageTracker.BufferedMessage peekSent()

    - #### peekReceived

          public final org.apache.zookeeper.server.util.MessageTracker.BufferedMessage peekReceived()

    - #### peekSentTimestamp

          public final long peekSentTimestamp()

    - #### peekReceivedTimestamp

          public final long peekReceivedTimestamp()

    - #### dumpToLog

          public void dumpToLog(String serverAddress)

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.