org.apache.hadoop.hbase.monitoring
Class MemoryBoundedLogMessageBuffer

java.lang.Object
  extended by 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.


Constructor Summary
MemoryBoundedLogMessageBuffer(long maxSizeBytes)
           
 
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
 

Constructor Detail

MemoryBoundedLogMessageBuffer

public MemoryBoundedLogMessageBuffer(long maxSizeBytes)
Method Detail

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 © 2015 The Apache Software Foundation. All Rights Reserved.