Package io.fluxcapacitor.common.tracking
Class SimpleTracker
java.lang.Object
io.fluxcapacitor.common.tracking.SimpleTracker
- All Implemented Interfaces:
Tracker
,Comparable<Tracker>
-
Field Summary
Fields inherited from interface io.fluxcapacitor.common.tracking.Tracker
comparator
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTracker
(String consumerName, int maxSize, Consumer<MessageBatch> handler) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
int
hashCode()
boolean
void
send
(MessageBatch batch) Sends a batch of messages to this tracker.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.fluxcapacitor.common.tracking.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:
ignoreSegment
in interfaceTracker
- Returns:
true
if this tracker ignores segment-based filtering (i.e. processes all segments).
-
clientControlledIndex
public boolean clientControlledIndex()- Specified by:
clientControlledIndex
in interfaceTracker
- Returns:
true
if this tracker uses client-controlled index tracking (instead of store-side indexing).
-
getTrackerId
- Specified by:
getTrackerId
in interfaceTracker
- Returns:
- the unique ID of this tracker instance.
-
getClientId
- Specified by:
getClientId
in interfaceTracker
- Returns:
- the unique ID of the client, typically one per client application instance.
-
getPurgeDelay
- Specified by:
getPurgeDelay
in 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 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
Description copied from interface:Tracker
Sends a batch of messages to this tracker. -
equals
-
hashCode
public int hashCode() -
toString
-