Class ManagementManager
java.lang.Object
org.datanucleus.management.ManagementManager
Management interface for DataNucleus.
Management operations and attributes are exposed through this interface that holds statistics linked to a NucleusContext instance.
The mechanics for starting and stopping JMX servers are not defined here, and must be done by plug-ins, by providing the implementation of ManagementServer.
This Manager controls the lifecycle of management servers.
A management server is started when an instance of this class is created, and its shutdown when the close operation is invoked
The management server startup is triggered when the Manager gets enabled.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether this is closed.private StringDomain name for this configuration.private StringInstance name for this configuration.private ManagementServerThe Management Server.private final NucleusContextNucleusContext that we are managing.static final RandomRandom number generator, for use when needing unique names. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidAssert that this instance is openvoidclose()Close a instance.voidderegisterMBean(String name) Deregister an MBean from the MBeanServerDomain name for this manager instance.Instance name for this manager instance.booleanisOpen()Whether this Manager is not closedvoidregisterMBean(Object mbean, String name) Register an MBean into the MBeanServerprivate voidStart Management Serverprivate voidShutdown Management Server
-
Field Details
-
random
Random number generator, for use when needing unique names. -
nucleusContext
NucleusContext that we are managing. -
closed
private boolean closedWhether this is closed. -
mgmtServer
The Management Server. -
domainName
Domain name for this configuration. -
instanceName
Instance name for this configuration.
-
-
Constructor Details
-
ManagementManager
Constructor for Management.- Parameters:
ctxt- the NucleusContext that we are operating for
-
-
Method Details
-
getInstanceName
-
getDomainName
-
registerMBean
-
deregisterMBean
Deregister an MBean from the MBeanServer- Parameters:
name- the mbean name
-
isOpen
public boolean isOpen()Whether this Manager is not closed- Returns:
- true if this Manager is open
-
close
-
assertNotClosed
private void assertNotClosed()Assert that this instance is open -
startManagementServer
private void startManagementServer()Start Management Server -
stopManagementServer
private void stopManagementServer()Shutdown Management Server
-