![JAR search and dependency download from the Maven repository](/logo.png)
net.java.truevfs.ext.pacemaker.PaceManagerView Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truevfs-ext-pacemaker Show documentation
Show all versions of truevfs-ext-pacemaker Show documentation
Constrains the number of concurrently mounted archive file systems in
order to save some heap space.
This module provides a JMX interface for monitoring and management.
Add the JAR artifact of this module to the run time class path to
make its services available for service location in the client API
modules.
The newest version!
/*
* Copyright © 2005 - 2021 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truevfs.ext.pacemaker;
import net.java.truevfs.comp.jmx.JmxManagerView;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanInfo;
/**
* A view for a {@link PaceManager}.
* This class is thread-safe.
*
* @author Christian Schlichtherle
*/
final class PaceManagerView extends JmxManagerView implements PaceManagerMXBean {
public PaceManagerView(PaceManager manager) {
super(manager, PaceManagerMXBean.class);
}
@Override
protected String getDescription(MBeanInfo info) {
return "A pace maker for the file system manager.";
}
@Override
protected String getDescription(MBeanAttributeInfo info) {
return "MaximumFileSystemsMounted".equals(info.getName())
? "The maximum number of mounted file systems."
: super.getDescription(info);
}
@Override
public int getMaximumFileSystemsMounted() {
return manager.getMaximumSize();
}
@Override
public void setMaximumFileSystemsMounted(int maxMounted) {
manager.setMaximumSize(maxMounted);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy