Class SimpleTracker
java.lang.Object
io.fluxzero.common.tracking.SimpleTracker
- All Implemented Interfaces:
Tracker, Comparable<Tracker>
-
Field Summary
Fields inherited from interface Tracker
comparator -
Constructor Summary
ConstructorsConstructorDescriptionSimpleTracker(String consumerName, int maxSize, Consumer<MessageBatch> handler) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleaninthashCode()booleanvoidsend(MessageBatch batch) Sends a batch of messages to this tracker.toString()Methods inherited from interface Tracker
canHandle, compareTo, getConsumerName, getDeadline, getLastTrackerIndex, getMaxSize, getTypeFilter, hasMissedDeadline, isFilterMessageTarget, maxTimeout, sendEmptyBatch, singleTracker, withLastTrackerIndex
-
Constructor Details
-
SimpleTracker
-
-
Method Details
-
ignoreSegment
public boolean ignoreSegment()- Specified by:
ignoreSegmentin interfaceTracker- Returns:
trueif this tracker ignores segment-based filtering (i.e. processes all segments).
-
clientControlledIndex
public boolean clientControlledIndex()- Specified by:
clientControlledIndexin interfaceTracker- Returns:
trueif this tracker uses client-controlled index tracking (instead of store-side indexing).
-
getTrackerId
- Specified by:
getTrackerIdin interfaceTracker- Returns:
- the unique ID of this tracker instance.
-
getClientId
- Specified by:
getClientIdin interfaceTracker- Returns:
- the unique ID of the client, typically one per client application instance.
-
getPurgeDelay
- Specified by:
getPurgeDelayin interfaceTracker- 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 the Fluxzero Java SDK — which may not send an explicit disconnect.
For most Fluxzero applications, purging should rarely occur, as disconnection is managed by the Fluxzero Java SDK
-
send
Description copied from interface:TrackerSends a batch of messages to this tracker. -
equals
-
hashCode
-
toString
-