Package com.github.jpmsilva.jsystemd
Class BufferPoolStatusProvider
java.lang.Object
com.github.jpmsilva.jsystemd.BufferPoolStatusProvider
- All Implemented Interfaces:
StatusProvider
Implementation of
StatusProvider that provides the memory used by the direct and mapped buffers, such as
Buffers: 64.0 MiB/1.0 GiB direct (412); 2.0 GiB mapped (3).
Buffers live outside of the heap, so they are neither part of the heap nor of the non-heap memory reported by the other status providers. Libraries
that do their own I/O, such as Netty, allocate direct buffers, and leaking them eventually fails with OutOfMemoryError: Direct buffer memory when
the limit of direct memory is reached.
The direct buffers are always reported, with their limit when it is known: the one set with -XX:MaxDirectMemorySize, or the maximum heap
size otherwise, as the JVM does. Mapped buffers are only reported while there are any.
- Author:
- Joao Silva
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BufferPoolStatusProvider
public BufferPoolStatusProvider()Create a new BufferPoolStatusProvider.
-
-
Method Details
-
status
Description copied from interface:StatusProviderExposes status information to send to systemd.- Specified by:
statusin interfaceStatusProvider- Returns:
- the string message to add to the service status
-