Skip to content
/ guavajmx Public

A MBean management library for Google Guava

License

Notifications You must be signed in to change notification settings

elexx/guavajmx

Repository files navigation

GuavaJmx

Build Status

Get insight in Guava via JMX.

Building

Currently GuavaJmx is not deployed to Maven Central. So you have to clone and build it yourself.

$ git clone https://github.com/elexx/guavajmx.git
$ cd guavajmx
guavajmx$ ./gradlew install

Dependency

GuavaJmx dependents on the oldest Guava version it at least needs to run. So if you need a newer Guava Version just add an explicit dependency to Guava!

Add a dependency to GuavaJMX using Maven:

<dependency>
    <groupId>com.github.elexx</groupId>
    <artifactId>guavajmx</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</dependency>

Add a dependency to GuavaJMX using Gradle:

dependencies {
    compile 'com.github.elexx:guavajmx:0.0.1-SNAPSHOT'
}

Usage

Cache

When building the Cache with Guava >12.0, don't forget to call .recordStats() otherwise the JMX bean will not show any statistics.

Cache<String, String> myCache = newBuilder()
    .recordStats()
    .build();

Register the bean with JMX:

GuavaJmxManagementService.register(myCache, "Name to be shown in JMX client");

About

A MBean management library for Google Guava

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages