Package org.jgroups.util
Class SuppressLog<T>
- java.lang.Object
- 
- org.jgroups.util.SuppressLog<T>
 
- 
 public class SuppressLog<T> extends java.lang.ObjectLog (usingSuppressCache) which suppresses (certain) messages from the same member for a given time- Since:
- 3.2
- Author:
- Bela Ban
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSuppressLog.Level
 - 
Field SummaryFields Modifier and Type Field Description protected SuppressCache<T>cacheprotected Loglogprotected java.lang.Stringmessage_formatprotected java.lang.Stringsuppress_format
 - 
Constructor SummaryConstructors Constructor Description SuppressLog(Log log)SuppressLog(Log log, java.lang.String message_key)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringcreateMessage(SuppressCache.Value val, java.lang.String format, java.lang.Object... args)voiderror(T key, long timeout, java.lang.Object... args)voiderror(T key, long timeout, java.lang.String format, java.lang.Object... args)SuppressCache<T>getCache()protected voidlog(SuppressLog.Level level, java.lang.String message)voidlog(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 msvoidlog(SuppressLog.Level level, T key, long timeout, java.lang.String format, java.lang.Object... args)voidremoveExpired(long timeout)voidtrace(T key, long timeout, java.lang.Object... args)voidtrace(T key, long timeout, java.lang.String format, java.lang.Object... args)voidwarn(T key, long timeout, java.lang.Object... args)voidwarn(T key, long timeout, java.lang.String format, java.lang.Object... args)
 
- 
- 
- 
Field Detail- 
logprotected final Log log 
 - 
cacheprotected final SuppressCache<T> cache 
 - 
message_formatprotected final java.lang.String message_format 
 - 
suppress_formatprotected final java.lang.String suppress_format 
 
- 
 - 
Method Detail- 
getCachepublic SuppressCache<T> getCache() 
 - 
logpublic 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 error
- key- The key into the SuppressCache, e.g. a member address or other topic ("thread_pool_full")
- timeout- The timeout
- args- The arguments to the message key
 
 - 
logpublic void log(SuppressLog.Level level, T key, long timeout, java.lang.String format, java.lang.Object... args) 
 - 
errorpublic void error(T key, long timeout, java.lang.Object... args) 
 - 
warnpublic void warn(T key, long timeout, java.lang.Object... args) 
 - 
tracepublic void trace(T key, long timeout, java.lang.Object... args) 
 - 
errorpublic void error(T key, long timeout, java.lang.String format, java.lang.Object... args) 
 - 
warnpublic void warn(T key, long timeout, java.lang.String format, java.lang.Object... args) 
 - 
tracepublic void trace(T key, long timeout, java.lang.String format, java.lang.Object... args) 
 - 
createMessageprotected java.lang.String createMessage(SuppressCache.Value val, java.lang.String format, java.lang.Object... args) 
 - 
logprotected void log(SuppressLog.Level level, java.lang.String message) 
 - 
removeExpiredpublic void removeExpired(long timeout) 
 
- 
 
-