org.jgroups.util
Class SuppressLog<T>

java.lang.Object
  extended by org.jgroups.util.SuppressLog<T>

public class SuppressLog<T>
extends java.lang.Object

Log (using SuppressCache) which suppresses (certain) messages from the same member for a given time

Since:
3.2
Author:
Bela Ban

Nested Class Summary
static class SuppressLog.Level
           
 
Field Summary
protected  SuppressCache<T> cache
           
protected  Log log
           
protected  java.lang.String message_format
           
protected  java.lang.String suppress_format
           
 
Constructor Summary
SuppressLog(Log log, java.lang.String message_key, java.lang.String suppress_msg)
           
 
Method Summary
 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 ms
 void removeExpired(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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,
                   java.lang.String suppress_msg)
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 error
key - The key into the SuppressCache
timeout - The timeout
args - The arguments to the message key

removeExpired

public void removeExpired(long timeout)


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.