Class LocalSchedulingClient
java.lang.Object
io.fluxzero.sdk.tracking.client.LocalTrackingClient
io.fluxzero.sdk.scheduling.client.LocalSchedulingClient
- All Implemented Interfaces:
Monitored<List<SerializedMessage>>, HasMessageStore, GatewayClient, SchedulingClient, TrackingClient, AutoCloseable
A client implementation for managing scheduling operations using an in-memory schedule store.
This class extends
LocalTrackingClient and implements the SchedulingClient interface.
It serves as a local, non-distributed scheduling client primarily useful for testing scenarios
or where an in-memory schedule store suffices.-
Constructor Summary
ConstructorsConstructorDescriptionLocalSchedulingClient(Duration messageExpiration) LocalSchedulingClient(Duration messageExpiration, Clock clock) LocalSchedulingClient(Duration messageExpiration, Clock clock, Duration initialPositionLag) Creates a clock-controlled local scheduling client with a configurable initial look-back.LocalSchedulingClient(Duration messageExpiration, Duration initialPositionLag) Creates a local scheduling client with a configurable look-back for consumers without a stored position. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes any open resources associated with this client.Returns the associatedMessageStoreinstance.voidMethods inherited from class LocalTrackingClient
append, claimSegment, disconnectTracker, getPosition, read, readFromIndex, readFromIndex, readRange, readRange, registerMonitor, resetPosition, setRetentionTime, storePosition, truncateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SchedulingClient
cancelSchedule, cancelSchedule, getSchedule, hasSchedule, schedule, scheduleMethods inherited from interface TrackingClient
disconnectTracker, getMessageType, getTopic, readAndWait, resetPosition, storePosition
-
Constructor Details
-
LocalSchedulingClient
-
LocalSchedulingClient
Creates a local scheduling client with a configurable look-back for consumers without a stored position.- Parameters:
messageExpiration- retention duration for local schedulesinitialPositionLag- duration subtracted from the current time for a new consumer
-
LocalSchedulingClient
-
LocalSchedulingClient
Creates a clock-controlled local scheduling client with a configurable initial look-back.- Parameters:
messageExpiration- retention duration for local schedulesclock- clock used by the schedule storeinitialPositionLag- duration subtracted from the current time for a new consumer
-
-
Method Details
-
setClock
-
getMessageStore
Description copied from interface:HasMessageStoreReturns the associatedMessageStoreinstance.- Specified by:
getMessageStorein interfaceHasMessageStore
-
close
public void close()Description copied from interface:TrackingClientCloses any open resources associated with this client.Once closed, the client should no longer be used to fetch or commit tracking state.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceGatewayClient- Specified by:
closein interfaceSchedulingClient- Specified by:
closein interfaceTrackingClient- Overrides:
closein classLocalTrackingClient
-