Class DigestSender

java.lang.Object
io.meeds.commons.digest.service.DigestSender

@Component public class DigestSender extends Object
One run of the digest sender job: the safety cleanup, then the selection of the users due now, then one task per due user serving his frequencies one after the other, on a small worker pool. Each occurrence is one transaction of DigestOccurrenceProcessor: whatever fails in it rolls back, claim included, and the user is served again at the next run.
  • Constructor Details

  • Method Details

    • processDueDigests

      public void processDueDigests()
    • candidateBatchSize

      protected int candidateBatchSize()
      How many candidates one query reads; a test lowers it
    • runInContainer

      protected void runInContainer(Runnable task)
      Binds the portal container and a request lifecycle to the current thread, the way the kernel does for a request: the workers run on a bare pool thread that has none. The previous container, if any, is restored.