public class JavaAppUtils
extends java.lang.Object
Constructor and Description |
---|
JavaAppUtils() |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Function<javax.management.openmbean.CompositeData,java.lang.management.MemoryUsage> |
compositeDataToMemoryUsage() |
static void |
connectJavaAppServerPolicies(EntityLocal entity) |
static void |
connectJavaAppServerPolicies(EntityLocal entity,
Duration windowPeriod) |
static JmxFeed |
connectMXBeanSensors(EntityLocal entity) |
static JmxFeed |
connectMXBeanSensors(EntityLocal entity,
Duration jmxPollPeriod) |
static JmxFeed |
connectMXBeanSensors(EntityLocal entity,
long jmxPollPeriodMs) |
static JmxFeed.Builder |
getMxBeanSensorsBuilder(EntityLocal entity) |
static JmxFeed.Builder |
getMxBeanSensorsBuilder(EntityLocal entity,
Duration jmxPollPeriod) |
static JmxFeed.Builder |
getMxBeanSensorsBuilder(EntityLocal entity,
long jmxPollPeriod) |
static void |
init()
Setup renderer hints for the MXBean attributes.
|
static boolean |
isEntityMxBeanStatsEnabled(Entity entity) |
static com.google.common.base.Function<java.lang.Number,java.lang.Double> |
times(double x)
Deprecated.
Since 0.7.0. Use
MathFunctions.times(double) instead |
public static boolean isEntityMxBeanStatsEnabled(Entity entity)
@Nullable public static JmxFeed connectMXBeanSensors(EntityLocal entity)
@Nullable public static JmxFeed connectMXBeanSensors(EntityLocal entity, long jmxPollPeriodMs)
@Nullable public static JmxFeed connectMXBeanSensors(EntityLocal entity, Duration jmxPollPeriod)
entity
- The entity at which to polljmxPollPeriod
- How often to pollJmxFeed
configured to poll the given entity at the given period,
or null if the entity is not configured for MXBEAN_STATSUsesJavaMXBeans.MXBEAN_STATS_ENABLED
public static void connectJavaAppServerPolicies(EntityLocal entity)
public static void connectJavaAppServerPolicies(EntityLocal entity, Duration windowPeriod)
@Nonnull public static JmxFeed.Builder getMxBeanSensorsBuilder(EntityLocal entity)
entity
- The entity at which to pollJmxFeed.Builder
configured to poll entity every ten secondsgetMxBeanSensorsBuilder(EntityLocal, Duration)
@Nonnull public static JmxFeed.Builder getMxBeanSensorsBuilder(EntityLocal entity, long jmxPollPeriod)
@Nonnull public static JmxFeed.Builder getMxBeanSensorsBuilder(EntityLocal entity, Duration jmxPollPeriod)
entity
- The entity at which to polljmxPollPeriod
- How often to pollJmxFeed.Builder
configured to poll many interesting MXBeans
at the given entity and to repeat according to the given poll period.
If an entity does not have MXBean stats enabled (i.e. UsesJavaMXBeans.MXBEAN_STATS_ENABLED
is
configured to false) then returns a builder configured with entity and duration but no polls.
Use connectMXBeanSensors(EntityLocal, Duration)
to create and build in one step.@Deprecated public static com.google.common.base.Function<java.lang.Number,java.lang.Double> times(double x)
MathFunctions.times(double)
insteadpublic static com.google.common.base.Function<javax.management.openmbean.CompositeData,java.lang.management.MemoryUsage> compositeDataToMemoryUsage()
public static void init()