org.apache.hadoop.hbase.monitoring
Class MemoryBoundedLogMessageBuffer
java.lang.Object
org.apache.hadoop.hbase.monitoring.MemoryBoundedLogMessageBuffer
public class MemoryBoundedLogMessageBuffer
- extends Object
A size-bounded repository of alerts, which are kept
in a linked list. Alerts can be added, and they will
automatically be removed one by one when the specified heap
usage is exhausted.
Method Summary |
void |
add(String messageText)
Append the given message to this buffer, automatically evicting
older messages until the desired memory limit is achieved. |
void |
dumpTo(PrintWriter out)
Dump the contents of the buffer to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryBoundedLogMessageBuffer
public MemoryBoundedLogMessageBuffer(long maxSizeBytes)
add
public void add(String messageText)
- Append the given message to this buffer, automatically evicting
older messages until the desired memory limit is achieved.
dumpTo
public void dumpTo(PrintWriter out)
- Dump the contents of the buffer to the given stream.
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.