Class NoSpamLogger

java.lang.Object
org.apache.cassandra.utils.NoSpamLogger

public class NoSpamLogger extends Object
Logging that limits each log statement to firing based on time since the statement last fired. Every logger has a unique timer per statement. Minimum time between logging is set for each statement the first time it is used and a subsequent attempt to request that statement with a different minimum time will result in the original time being used. No warning is provided if there is a mismatch. If the statement is cached and used to log directly then only a volatile read will be required in the common case. If the Logger is cached then there is a single concurrent hash map lookup + the volatile read. If neither the logger nor the statement is cached then it is two concurrent hash map lookups + the volatile read.