java.lang.Object
com.aoindustries.aoserv.jilter.EmailCounter

public final class EmailCounter extends Object
Keeps track of the number of emails for one business and direction (in, out, relay).
Author:
AO Industries, Inc.
  • Constructor Details

    • EmailCounter

      public EmailCounter(String accounting, EmailLimit emailLimit)
      Creates a new email counter.
  • Method Details

    • getAccounting

      public String getAccounting()
    • getEmailLimit

      public EmailLimit getEmailLimit()
    • getEmailCount

      public int getEmailCount()
    • getLastDecrementTime

      public long getLastDecrementTime()
      All access to this method should be synchronized externally.
    • reset

      public void reset(long currentTimeMillis)
      All access to this method should be synchronized externally.
    • decrement

      public void decrement(long decrementCount, long currentTimeMillis)
      All access to this method should be synchronized externally.
    • increment

      public void increment()
      All access to this method should be synchronized externally.
    • getNotifyDelayMinutes

      public int getNotifyDelayMinutes()
    • setNotifyDelayMinutes

      public void setNotifyDelayMinutes(int notifyDelayMinutes)
    • getLastNotifyTime

      public long getLastNotifyTime()
      Gets the last notify time or -1 if not yet notified.
    • setLastNotifyTime

      public void setLastNotifyTime(long lastNotifyTime)