java.lang.Object
i2p.susi.webmail.PersistentMailCache.Loader
All Implemented Interfaces:
Runnable
Enclosing class:
PersistentMailCache

private static class PersistentMailCache.Loaderextends Object implements Runnable
Load files from in, add mail to out.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Queue<File>
    Files being read from the cache.
    private final boolean
    True when reading from the cache.
    private final Queue<Mail>
    Mails being written to the cache.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Loader(Queue<File> in, Queue<Mail> out, boolean isDrafts)
    Take the queues to drain and whether the files are drafts, so the resulting Mail objects are built the right way.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    void
    run()
     

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _in

      private final Queue<File> _in
      Files being read from the cache.
    • _out

      private final Queue<Mail> _out
      Mails being written to the cache.
    • _isD

      private final boolean _isD
      True when reading from the cache.
  • Constructor Details

    • Loader

      public Loader(Queue<File> in, Queue<Mail> out, boolean isDrafts)
      Take the queues to drain and whether the files are drafts, so the resulting Mail objects are built the right way.
      Parameters:
      in - queue of files to load
      out - queue to put loaded mails into
      isDrafts - whether these are drafts
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable