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

org.jruby.management.ClassCache Maven / Gradle / Ivy

There is a newer version: 9.4.9.0
Show newest version
package org.jruby.management;

import java.lang.ref.SoftReference;

import org.jruby.Ruby;

public class ClassCache implements ClassCacheMBean {
    private final SoftReference ruby;
    
    public ClassCache(Ruby ruby) {
        this.ruby = new SoftReference(ruby);
    }

    public boolean isFull() {
        return ruby.get().getInstanceConfig().getClassCache().isFull();
    }

    public int getClassLoadCount() {
        return ruby.get().getInstanceConfig().getClassCache().getClassLoadCount();
    }

    public int getLiveClassCount() {
        return ruby.get().getInstanceConfig().getClassCache().getLiveClassCount();
    }

    public int getClassReuseCount() {
        return ruby.get().getInstanceConfig().getClassCache().getClassReuseCount();
    }

    public void flush() {
        ruby.get().getInstanceConfig().getClassCache().flush();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy