/** * Handles Disk Creation. Will create DiskStoreMXBean and will send a * notification * * @param disk * the disk store for which the call back is invoked */ public void handleDiskCreation(DiskStore disk) throws ManagementException{ if (!isServiceInitialised("handleDiskCreation")) { return; } DiskStoreMBeanBridge bridge = new DiskStoreMBeanBridge(disk); DiskStoreMXBean diskStoreMBean = new DiskStoreMBean(bridge); ObjectName diskStoreMBeanName = MBeanJMXAdapter.getDiskStoreMBeanName( cacheImpl.getDistributedSystem().getDistributedMember(), disk.getName()); ObjectName changedMBeanName = service.registerInternalMBean(diskStoreMBean, diskStoreMBeanName); service.federate(changedMBeanName, DiskStoreMXBean.class, true); Notification notification = new Notification( JMXNotificationType.DISK_STORE_CREATED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.DISK_STORE_CREATED_PREFIX + disk.getName()); memberLevelNotifEmitter.sendNotification(notification); memberMBeanBridge.addDiskStore(disk); }
/** * Handles Disk Creation. Will create DiskStoreMXBean and will send a * notification * * @param disk * the disk store for which the call back is invoked */ public void handleDiskCreation(DiskStore disk) throws ManagementException{ if (!isServiceInitialised("handleDiskCreation")) { return; } DiskStoreMBeanBridge bridge = new DiskStoreMBeanBridge(disk); DiskStoreMXBean diskStoreMBean = new DiskStoreMBean(bridge); ObjectName diskStoreMBeanName = MBeanJMXAdapter.getDiskStoreMBeanName( cacheImpl.getDistributedSystem().getDistributedMember(), disk.getName()); ObjectName changedMBeanName = service.registerInternalMBean(diskStoreMBean, diskStoreMBeanName); service.federate(changedMBeanName, DiskStoreMXBean.class, true); Notification notification = new Notification( ResourceNotification.DISK_STORE_CREATED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ResourceNotification.DISK_STORE_CREATED_PREFIX + disk.getName()); memberLevelNotifEmitter.sendNotification(notification); memberMBeanBridge.addDiskStore(disk); }