Package org.masukomi.aspirin.core.store.mail

Examples of org.masukomi.aspirin.core.store.mail.MailStore


        AspirinInternal.getLogger().info("Maintenance thread goes down.");
      }
      // Maintain queues in every hour
      try {
        QueueStore queueStore = AspirinInternal.getConfiguration().getQueueStore();
        MailStore mailStore = AspirinInternal.getConfiguration().getMailStore();
        List<String> usedMailIds = queueStore.clean();
        List<String> mailStoreMailIds = mailStore.getMailIds();
        AspirinInternal.getLogger().debug("Maintenance running: usedMailIds: {}, mailStoreMailIds: {}.",new Object[]{usedMailIds.size(), mailStoreMailIds.size()});
        if( mailStoreMailIds.removeAll(usedMailIds) )
        {
          for( String unusedMailId : mailStoreMailIds )
            mailStore.remove(unusedMailId);
        }
      } catch (Exception e) {
        AspirinInternal.getLogger().error("Maintenance failed.",e);
      }
    }
View Full Code Here

TOP

Related Classes of org.masukomi.aspirin.core.store.mail.MailStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.