com.atlassian.confluence.plugins.emailgateway.blacklist
Class RealTimeBlacklist<T>
java.lang.Object
com.atlassian.confluence.plugins.emailgateway.blacklist.RealTimeBlacklist<T>
- All Implemented Interfaces:
- Blacklist<T>
public class RealTimeBlacklist<T>
- extends Object
- implements Blacklist<T>
Maintains a real-time, in-memory view of which sender accounts are sending us too many emails.
- Since:
- v5.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_EXPIRY_DURATION
public static final org.joda.time.Duration DEFAULT_EXPIRY_DURATION
RealTimeBlacklist
public RealTimeBlacklist()
RealTimeBlacklist
public RealTimeBlacklist(int maxCacheSize,
int blacklistThreshold,
org.joda.time.Duration expiryDuration)
getCurrentCounts
public Map<T,? extends Number> getCurrentCounts()
incrementAndCheckBlacklist
public boolean incrementAndCheckBlacklist(T key)
- Description copied from interface:
Blacklist
- Registers an event for the given key and check if that key is now black-listed
- Specified by:
incrementAndCheckBlacklist
in interface Blacklist<T>
isBlackListed
public boolean isBlackListed(T key)
- Description copied from interface:
Blacklist
- Checks to see if the give key is currently blacklisted
- Specified by:
isBlackListed
in interface Blacklist<T>
getMaxCacheSize
public int getMaxCacheSize()
getBlacklistThreshold
public int getBlacklistThreshold()
getExpiryDuration
public org.joda.time.Duration getExpiryDuration()
Copyright © 2003-2013 Atlassian. All Rights Reserved.