All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arpnetworking.metrics.jvm.ManagementFactory Maven / Gradle / Ivy

/**
 * Copyright 2015 Groupon.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.arpnetworking.metrics.jvm;

import java.lang.management.BufferPoolMXBean;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.OperatingSystemMXBean;
import java.lang.management.ThreadMXBean;
import java.util.List;

/**
 * This interface defines the various methods to get JVM related data. This interface exists only to facilitate
 * testing and the clients should never need to implement this.
 *
 * @author Deepika Misra (deepika at groupon dot com)
 */
public interface ManagementFactory {

    /**
     * Gets the List of GarbageCollectorMXBean.
     *
     * @return A List of GarbageCollectorMXBean.
     */
    List getGarbageCollectorMXBeans();

    /**
     * Gets the MemoryMXBean.
     *
     * @return An instance of MemoryMXBean.
     */
    MemoryMXBean getMemoryMXBean();

    /**
     * Gets the List of MemoryPoolMXBean.
     *
     * @return A List of MemoryPoolMXBean.
     */
    List getMemoryPoolMXBeans();

    /**
     * Gets the ThreadMXBean.
     *
     * @return An instance of ThreadMXBean.
     */
    ThreadMXBean getThreadMXBean();

    /**
     * Gets the List of BufferPoolMXBean.
     *
     * @return A List of BufferPoolMXBean.
     */
    List getBufferPoolMXBeans();

    /**
     * Gets the OperatingSystemMXBean.
     *
     * @return An instance of OperatingSystemMXBean.
     */
    OperatingSystemMXBean getOperatingSystemMXBean();
}







© 2015 - 2024 Weber Informatics LLC | Privacy Policy