Class SuppressLog<T>

java.lang.Object
org.jgroups.util.SuppressLog<T>
Type Parameters:
T - T

public class SuppressLog<T> extends Object
Log (using SuppressCache) which suppresses (certain) messages from the same member for a given time
Since:
3.2
Author:
Bela Ban
  • Field Details

    • log

      protected final Log log
    • cache

      protected final SuppressCache<T> cache
    • message_format

      protected final String message_format
    • suppress_format

      protected final String suppress_format
  • Constructor Details

    • SuppressLog

      public SuppressLog(Log log, String message_key)
    • SuppressLog

      public SuppressLog(Log log)
  • Method Details

    • getCache

      public SuppressCache<T> getCache()
    • log

      public void log(SuppressLog.Level level, T key, long timeout, 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
    • log

      public void log(SuppressLog.Level level, T key, long timeout, String format, Object... args)
    • error

      public void error(T key, long timeout, Object... args)
    • warn

      public void warn(T key, long timeout, Object... args)
    • trace

      public void trace(T key, long timeout, Object... args)
    • error

      public void error(T key, long timeout, String format, Object... args)
    • warn

      public void warn(T key, long timeout, String format, Object... args)
    • trace

      public void trace(T key, long timeout, String format, Object... args)
    • createMessage

      protected String createMessage(SuppressCache.Value val, String format, Object... args)
    • log

      protected void log(SuppressLog.Level level, String message)
    • removeExpired

      public void removeExpired(long timeout)