Class TestServerScheduleStore

java.lang.Object
io.fluxcapacitor.testserver.scheduling.TestServerScheduleStore
All Implemented Interfaces:
Monitored<List<SerializedMessage>>, HasMessageStore, MessageStore, SchedulingClient, AutoCloseable

public class TestServerScheduleStore extends Object implements MessageStore, SchedulingClient
  • Constructor Details

  • Method Details

    • schedule

      public CompletableFuture<Void> schedule(Guarantee guarantee, SerializedSchedule... schedules)
      Description copied from interface: SchedulingClient
      Schedule one or more serialized schedules with a specified Guarantee.
      Specified by:
      schedule in interface SchedulingClient
      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

      public List<SerializedMessage> getBatch(Long minIndex, int maxSize)
      Description copied from interface: MessageStore
      Retrieves a batch of messages starting from the given lastIndex (exclusive).
      Specified by:
      getBatch in interface MessageStore
      Parameters:
      minIndex - minimum message index to start from (exclusive)
      maxSize - maximum number of messages to retrieve
      Returns:
      a list of SerializedMessage instances
    • getBatch

      public List<SerializedMessage> getBatch(Long minIndex, int maxSize, boolean inclusive)
      Description copied from interface: MessageStore
      Retrieves a batch of messages starting from the given minIndex.
      Specified by:
      getBatch in interface MessageStore
      Parameters:
      minIndex - minimum message index to start from
      maxSize - maximum number of messages to retrieve
      inclusive - whether to include the message at minIndex
      Returns:
      a list of SerializedMessage instances
    • rescheduleNextDeadline

      protected void rescheduleNextDeadline(long nextIndex)