Class FileDirStore


  • public class FileDirStore
    extends Object
    FileDirStore stores scheduled mails in the file system in a single directory. Mails are stored in two files. A properties file contains the envelope information and a binary file contains the message content. In order to provide some consistency in case of a system failure, the two files are created and deleted in a specific order. On creation first the message content file is saved, then the properties file. On deletion the order is the opposite, the properties file is deleted first. The two files have the same name but with different extension (.properties and .eml). The name is the scheduled date with an additional serial number if it is necessary, so it become a unique.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDirStore()
      use this constructor with setters
      FileDirStore​(java.io.File dir, int maxQueueSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(mireka.transmission.queue.MailName mailName)  
      mireka.transmission.queue.MailName[] initializeAndQueryMailNamesOrderedBySchedule()
      this function must be called before any other method, and it cannot be called more then once.
      void moveToErrorDir​(mireka.transmission.queue.MailName mailName)  
      Mail read​(mireka.transmission.queue.MailName mailName)  
      mireka.transmission.queue.MailName save​(Mail srcMail)  
      void setDir​(String dir)  
      void setMaxSize​(int maxSize)  
      String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FileDirStore

        public FileDirStore()
        use this constructor with setters
      • FileDirStore

        public FileDirStore​(java.io.File dir,
                            int maxQueueSize)