Package net.minecraft.server.dedicated
Class ServerMBean
java.lang.Object
net.minecraft.server.dedicated.ServerMBean
- All Implemented Interfaces:
DynamicMBean
public final class ServerMBean extends Object implements DynamicMBean
A dynamic management object for a Minecraft Server.
It exposes the average tick time and the historical tick times of the Minecraft Server.
- See Also:
DynamicMBean
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classServerMBean.EntryRepresents a read-only attribute of the server MBean. -
Field Summary
Fields Modifier and Type Field Description private MBeanInfobeanInfoprivate Map<String,ServerMBean.Entry>entriesprivate static LoggerLOGGERprivate MinecraftServerserver -
Constructor Summary
Constructors Modifier Constructor Description privateServerMBean(MinecraftServer server) -
Method Summary
Modifier and Type Method Description ObjectgetAttribute(String attribute)AttributeListgetAttributes(String[] attributes)private floatgetAverageTickTime()Returns the server's current average tick time, in milliseconds.MBeanInfogetMBeanInfo()private long[]getTickTimes()Returns the server's historical tick times, in milliseconds.Objectinvoke(String actionName, Object[] params, String[] signature)static voidregister(MinecraftServer server)Registers a dynamic MBean for a Minecraft Server.voidsetAttribute(Attribute attribute)AttributeListsetAttributes(AttributeList attributes)
-
Field Details
-
LOGGER
-
server
-
beanInfo
-
entries
-
-
Constructor Details
-
ServerMBean
-
-
Method Details
-
register
Registers a dynamic MBean for a Minecraft Server.- Parameters:
server- the server to have the MBean
-
getAverageTickTime
private float getAverageTickTime()Returns the server's current average tick time, in milliseconds. -
getTickTimes
private long[] getTickTimes()Returns the server's historical tick times, in milliseconds. -
getAttribute
- Specified by:
getAttributein interfaceDynamicMBean
-
setAttribute
- Specified by:
setAttributein interfaceDynamicMBean
-
getAttributes
- Specified by:
getAttributesin interfaceDynamicMBean
-
setAttributes
- Specified by:
setAttributesin interfaceDynamicMBean
-
invoke
- Specified by:
invokein interfaceDynamicMBean
-
getMBeanInfo
- Specified by:
getMBeanInfoin interfaceDynamicMBean
-