Class SimpleTracker

java.lang.Object
io.fluxcapacitor.common.tracking.SimpleTracker
All Implemented Interfaces:
Tracker, Comparable<Tracker>

public class SimpleTracker extends Object implements Tracker
  • Constructor Details

  • Method Details

    • ignoreSegment

      public boolean ignoreSegment()
      Specified by:
      ignoreSegment in interface Tracker
      Returns:
      true if this tracker ignores segment-based filtering (i.e. processes all segments).
    • clientControlledIndex

      public boolean clientControlledIndex()
      Specified by:
      clientControlledIndex in interface Tracker
      Returns:
      true if this tracker uses client-controlled index tracking (instead of store-side indexing).
    • getTrackerId

      public String getTrackerId()
      Specified by:
      getTrackerId in interface Tracker
      Returns:
      the unique ID of this tracker instance.
    • getClientId

      public String getClientId()
      Specified by:
      getClientId in interface Tracker
      Returns:
      the unique ID of the client, typically one per client application instance.
    • getPurgeDelay

      public Long getPurgeDelay()
      Specified by:
      getPurgeDelay in interface Tracker
      Returns:
      the optional duration (in milliseconds) after which this tracker may be purged if it is actively processing messages (i.e., not idle or waiting).

      This mechanism ensures that stale trackers are eventually cleaned up, particularly in scenarios where graceful disconnection is not guaranteed. This is especially relevant for external trackers — such as non-Java applications or clients not using Flux’s built-in client — which may not send an explicit disconnect.

      In normal Flux client usage, purging should rarely occur, as disconnection is managed by the client.

    • send

      public void send(MessageBatch batch)
      Description copied from interface: Tracker
      Sends a batch of messages to this tracker.
      Specified by:
      send in interface Tracker
      Parameters:
      batch - the batch to deliver
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object