net.java.truevfs.ext.pace.PaceManagerView.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truevfs-ext-pacemanager Show documentation
Show all versions of truevfs-ext-pacemanager 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.
/*
* Copyright (C) 2005-2012 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truevfs.ext.pace
import javax.annotation.concurrent.ThreadSafe
import javax.management.MBeanAttributeInfo
import javax.management.MBeanInfo
import net.java.truevfs.comp.jmx.JmxManagerView
/**
* A view for a [[net.java.truevfs.ext.pace.PaceManager]].
*
* @author Christian Schlichtherle
*/
@ThreadSafe
private final class PaceManagerView(manager: PaceManager)
extends JmxManagerView[PaceManager](classOf[PaceManagerMXBean], manager)
with PaceManagerMXBean {
protected override def getDescription(info: MBeanInfo) = "A pace manager"
protected override def getDescription(info: MBeanAttributeInfo) = {
info.getName match {
case "MaximumFileSystemsMounted" => "The maximum number of mounted file systems."
case _ => super.getDescription(info)
}
}
override def getMaximumFileSystemsMounted = manager.maximumFileSystemsMounted
override def setMaximumFileSystemsMounted(max: Int) {
manager.maximumFileSystemsMounted = max
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy