Class TestServerScheduleStore
java.lang.Object
io.fluxzero.testserver.scheduling.TestServerScheduleStore
- All Implemented Interfaces:
Monitored<List<SerializedMessage>>, HasMessageStore, MessageStore, SchedulingClient, AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a batch of messages starting from the givenlastIndex(exclusive).Retrieves a batch of messages starting from the givenminIndex.protected voidrescheduleNextDeadline(long nextIndex) schedule(Guarantee guarantee, SerializedSchedule... schedules) Schedule one or more serialized schedules with a specifiedGuarantee.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MessageStore
append, append, close, getMessageStore, setRetentionTime, unwrapMethods inherited from interface Monitored
registerMonitorMethods inherited from interface SchedulingClient
cancelSchedule, cancelSchedule, close, getSchedule, hasSchedule, schedule
-
Constructor Details
-
TestServerScheduleStore
-
-
Method Details
-
schedule
Description copied from interface:SchedulingClientSchedule one or more serialized schedules with a specifiedGuarantee.- Specified by:
schedulein interfaceSchedulingClient- Parameters:
guarantee- Delivery guarantee to apply (e.g., none, sent, stored).schedules- One or more schedules to register.- Returns:
- A future that completes when the scheduling is acknowledged.
-
getBatch
Description copied from interface:MessageStoreRetrieves a batch of messages starting from the givenlastIndex(exclusive).- Specified by:
getBatchin interfaceMessageStore- Parameters:
minIndex- minimum message index to start from (exclusive)maxSize- maximum number of messages to retrieve- Returns:
- a list of
SerializedMessageinstances
-
getBatch
Description copied from interface:MessageStoreRetrieves a batch of messages starting from the givenminIndex.- Specified by:
getBatchin interfaceMessageStore- Parameters:
minIndex- minimum message index to start frommaxSize- maximum number of messages to retrieveinclusive- whether to include the message atminIndex- Returns:
- a list of
SerializedMessageinstances
-
rescheduleNextDeadline
protected void rescheduleNextDeadline(long nextIndex)
-