java.lang.Object
com.aoindustries.aoserv.jilter.EmailCounter
Keeps track of the number of emails for one business and direction (in, out, relay).
- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorDescriptionEmailCounter
(String accounting, EmailLimit emailLimit) Creates a new email counter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
decrement
(long decrementCount, long currentTimeMillis) All access to this method should be synchronized externally.int
long
All access to this method should be synchronized externally.long
Gets the last notify time or-1
if not yet notified.int
void
All access to this method should be synchronized externally.void
reset
(long currentTimeMillis) All access to this method should be synchronized externally.void
setLastNotifyTime
(long lastNotifyTime) void
setNotifyDelayMinutes
(int notifyDelayMinutes)
-
Constructor Details
-
EmailCounter
Creates a new email counter.
-
-
Method Details
-
getAccounting
-
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)
-