Package org.jgroups.util
Class SuppressLog<T>
- java.lang.Object
-
- org.jgroups.util.SuppressLog<T>
-
public class SuppressLog<T> extends java.lang.Object
Log (usingSuppressCache
) which suppresses (certain) messages from the same member for a given time- Since:
- 3.2
- Author:
- Bela Ban
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SuppressLog.Level
-
Field Summary
Fields Modifier and Type Field Description protected SuppressCache<T>
cache
protected Log
log
protected java.lang.String
message_format
protected java.lang.String
suppress_format
-
Constructor Summary
Constructors Constructor Description SuppressLog(Log log, java.lang.String message_key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SuppressCache<T>
getCache()
void
log(SuppressLog.Level level, T key, long timeout, java.lang.Object... args)
Logs a message from a given member if is hasn't been logged for timeout msvoid
removeExpired(long timeout)
-
-
-
Field Detail
-
log
protected final Log log
-
cache
protected final SuppressCache<T> cache
-
message_format
protected final java.lang.String message_format
-
suppress_format
protected final java.lang.String suppress_format
-
-
Constructor Detail
-
SuppressLog
public SuppressLog(Log log, java.lang.String message_key)
-
-
Method Detail
-
getCache
public SuppressCache<T> getCache()
-
log
public void log(SuppressLog.Level level, T key, long timeout, java.lang.Object... args)
Logs a message from a given member if is hasn't been logged for timeout ms- Parameters:
level
- The level, either warn or errorkey
- The key into the SuppressCache, e.g. a member address or other topic ("thread_pool_full")timeout
- The timeoutargs
- The arguments to the message key
-
removeExpired
public void removeExpired(long timeout)
-
-