@Override public Collection<DistributedObject> getDistributedObjects() { return getOriginal().getDistributedObjects(); }
@Override public Collection<DistributedObject> getDistributedObjects() { return getOriginal().getDistributedObjects(); }
public ManagementService(HazelcastInstanceImpl instance) { this.instance = instance; this.logger = instance.getLoggingService().getLogger(getClass()); this.enabled = instance.node.getProperties().getBoolean(GroupProperty.ENABLE_JMX); if (!enabled) { this.instanceMBean = null; this.registrationId = null; return; } logger.info("Hazelcast JMX agent enabled."); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); InstanceMBean instanceMBean; try { instanceMBean = createInstanceMBean(instance); mbs.registerMBean(instanceMBean, instanceMBean.objectName); } catch (Exception e) { instanceMBean = null; logger.warning("Unable to start JMX service", e); } this.instanceMBean = instanceMBean; this.registrationId = instance.addDistributedObjectListener(this); for (final DistributedObject distributedObject : instance.getDistributedObjects()) { registerDistributedObject(distributedObject); } }
public ManagementService(HazelcastInstanceImpl instance) { this.instance = instance; this.logger = instance.getLoggingService().getLogger(getClass()); this.enabled = instance.node.getProperties().getBoolean(GroupProperty.ENABLE_JMX); if (!enabled) { this.instanceMBean = null; this.registrationId = null; return; } logger.info("Hazelcast JMX agent enabled."); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); InstanceMBean instanceMBean; try { instanceMBean = createInstanceMBean(instance); mbs.registerMBean(instanceMBean, instanceMBean.objectName); } catch (Exception e) { instanceMBean = null; logger.warning("Unable to start JMX service", e); } this.instanceMBean = instanceMBean; this.registrationId = instance.addDistributedObjectListener(this); for (final DistributedObject distributedObject : instance.getDistributedObjects()) { registerDistributedObject(distributedObject); } }