Class MemoryBoundedLogMessageBuffer
java.lang.Object
org.apache.hadoop.hbase.monitoring.MemoryBoundedLogMessageBuffer
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.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final long
private long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.(package private) long
Estimate the number of bytes this buffer is currently using.(package private) List<MemoryBoundedLogMessageBuffer.LogMessage>
-
Field Details
-
maxSizeBytes
-
usage
-
messages
-
-
Constructor Details
-
MemoryBoundedLogMessageBuffer
-
-
Method Details
-
add
Append the given message to this buffer, automatically evicting older messages until the desired memory limit is achieved. -
dumpTo
Dump the contents of the buffer to the given stream. -
getMessages
-
estimateHeapUsage
long estimateHeapUsage()Estimate the number of bytes this buffer is currently using.
-