Class DrainResult

java.lang.Object
at.aimon.memory.postgres.DrainResult

public final class DrainResult extends Object
Outcome of one KnowledgeStoreOutboxRelay.drainOnce() pass.

Counts the rows that were claimed in the batch and how each one resolved:

  • processed — successfully dispatched and removed from the outbox.
  • failed — dispatch raised but the row is still retryable (attempt count incremented, next_attempt_at pushed out).
  • poisoned — dispatch failed for the maxAttempts-th time; the row stays in the table with claimed_by='POISON' and is excluded from future drains.
  • Constructor Details

    • DrainResult

      public DrainResult(int processed, int failed, int poisoned)
  • Method Details

    • getProcessed

      public int getProcessed()
    • getFailed

      public int getFailed()
    • getPoisoned

      public int getPoisoned()
    • getClaimed

      public int getClaimed()
      Total rows claimed in the batch (sum of all three buckets).
    • toString

      public String toString()
      Overrides:
      toString in class Object