public abstract class ManagementService extends Object
Constructor and Description |
---|
ManagementService() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addMembershipListener(MembershipListener listener)
Registers a listener that receives call backs when a member joins or leaves the distributed
system.
|
abstract <T> void |
federate(ObjectName objectName,
Class<T> interfaceClass,
boolean notificationEmitter)
Adds a bean to the list of those being federated, meaning that it's state will be periodically
pushed to managing members.
|
abstract ObjectName |
getAsyncEventQueueMBeanName(DistributedMember member,
String queueId)
Returns the object name of the AsyncEventQueueMBean representing an asynchronous queue.
|
abstract Set<ObjectName> |
getAsyncEventQueueMBeanNames(DistributedMember member)
Returns the ids of the async event queues on this member
|
abstract ObjectName |
getCacheServerMBeanName(int serverPort,
DistributedMember member)
Returns the object name of the CacheServerMBean representing a cache server.
|
abstract ObjectName |
getDiskStoreMBeanName(DistributedMember member,
String diskName)
Returns the object name of the DiskStoreMBean representing a disk store.
|
abstract ObjectName |
getDistributedLockServiceMBeanName(String lockService)
Returns the object name of the DistributedLockServiceMBean representing a lock service.
|
abstract DistributedLockServiceMXBean |
getDistributedLockServiceMXBean(String lockServiceName)
Returns a LockServiceMXBean for managing and monitoring a lock service from a system wide
perspective.
|
abstract ObjectName |
getDistributedRegionMBeanName(String regionName)
Returns the object name of the DistributedRegionMBean representing a region.
|
abstract DistributedRegionMXBean |
getDistributedRegionMXBean(String regionPath)
Returns a DistributedRegionMXBean for managing and monitoring a region from a system wide
perspective.
|
abstract ObjectName |
getDistributedSystemMBeanName()
Returns the object name of the DistributedSystemMBean representing a distributed system.
|
abstract DistributedSystemMXBean |
getDistributedSystemMXBean()
Returns the DistributedSystemMXBean for managing and monitoring the distributed system as a
whole.
|
static ManagementService |
getExistingManagementService(Cache cache)
Returns the existing instance of the management service for a cache.
|
abstract ObjectName |
getGatewayReceiverMBeanName(DistributedMember member)
Returns the object name of the GatewayReceiverMBean representing a gateway receiver.
|
abstract ObjectName |
getGatewaySenderMBeanName(DistributedMember member,
String gatwaySenderId)
Returns the object name of the GatewaySenderMBean representing a gateway sender.
|
abstract long |
getLastUpdateTime(ObjectName objectName)
Returns the last updated time of the remote MBean as reported by Sysem.currentTimeMillis().
|
abstract AsyncEventQueueMXBean |
getLocalAsyncEventQueueMXBean(String queueId)
Returns a AsyncEventQueueMXBean for managing and monitoring an asynchronous queue.
|
abstract CacheServerMXBean |
getLocalCacheServerMXBean(int serverPort)
Returns a CacheServerMXBean for managing and monitoring a cache server.
|
abstract DiskStoreMXBean |
getLocalDiskStoreMBean(String diskStoreName)
Returns a DiskStoreMXBean for managing and monitoring a disk store.
|
abstract GatewayReceiverMXBean |
getLocalGatewayReceiverMXBean()
Returns the GatewayReceiverMXBean for managing and monitoring the gateway receiver.
|
abstract GatewaySenderMXBean |
getLocalGatewaySenderMXBean(String senderId)
Returns a GatewaySenderMXBean for managing and monitoring a gateway sender.
|
abstract LocatorMXBean |
getLocalLocatorMXBean()
Returns the LocatorMXBean for managing and monitoring the locator.
|
abstract LockServiceMXBean |
getLocalLockServiceMBean(String lockServiceName)
Returns a LockServiceMXBean for managing and monitoring a lock service.
|
abstract RegionMXBean |
getLocalRegionMBean(String regionPath)
Returns a RegionMXBbean for managing and monitoring a Region.
|
abstract ObjectName |
getLocatorMBeanName(DistributedMember member)
Returns the object name of the LocatorMBean representing a locator.
|
abstract ObjectName |
getLockServiceMBeanName(DistributedMember member,
String lockServiceName)
Returns the object name of the LockServiceMBean representing a lock service.
|
static ManagementService |
getManagementService(Cache cache)
Returns a newly created or the existing instance of the management service for a cache.
|
abstract ObjectName |
getManagerMBeanName()
Returns the object name of the ManagerMBean representing a manager.
|
abstract ManagerMXBean |
getManagerMXBean()
Returns the ManagerMXBean for the management service.
|
abstract <T> T |
getMBeanInstance(ObjectName objectName,
Class<T> interfaceClass)
Returns an instance of an MBean.
|
abstract ObjectName |
getMemberMBeanName(DistributedMember member)
Returns the object name of the MemberMBean representing a distributed member.
|
abstract MemberMXBean |
getMemberMXBean()
Returns the MemberMXBean for managing and monitoring the local member.
|
abstract ObjectName |
getRegionMBeanName(DistributedMember member,
String regionPath)
Returns the object name of the RegionMBean representing a region.
|
abstract boolean |
isManager()
Returns whether this member is running the management service.
|
abstract Set<ObjectName> |
queryMBeanNames(DistributedMember member)
Returns the object names for all MBeans associated with a member.
|
abstract ObjectName |
registerMBean(Object object,
ObjectName objectName)
Registers an MBean in the GemFire domain.
|
abstract void |
removeMembershipListener(MembershipListener listener)
Unregisters a membership listener
|
abstract void |
startManager()
Starts the management service on this member.
|
abstract void |
stopManager()
Stops the management service running on this member.
|
abstract void |
unregisterMBean(ObjectName objectName)
Unregisters an MBean.
|
public static ManagementService getManagementService(Cache cache)
cache
- Cache for which to get the management service.public static ManagementService getExistingManagementService(Cache cache)
cache
- Cache for which to get the management service.public abstract boolean isManager()
public abstract void startManager()
public abstract void stopManager()
public abstract ObjectName registerMBean(Object object, ObjectName objectName)
object
- MBean to register.objectName
- Object name of the MBean to register.public abstract void unregisterMBean(ObjectName objectName)
objectName
- Object name of the MBean to unregister.public abstract <T> void federate(ObjectName objectName, Class<T> interfaceClass, boolean notificationEmitter)
Example Usage:
CustomMXBean bean = new CustomMBean();
ObjectName beanName = ObjectName.getInstance("DefualtDomain:type=CustomType");
ObjectName gemfireBeanName = service.registerMBean(customMBean, customMBeanName);
service.federate(gemfireBeanName, CustomMXBean.class, true);
T
- the type of MBeanobjectName
- Object name of the MBean.interfaceClass
- Interface which this MBean exposes.notificationEmitter
- True if the MBean is a notification emitter.public abstract MemberMXBean getMemberMXBean()
public abstract RegionMXBean getLocalRegionMBean(String regionPath)
regionPath
- Path of the region.public abstract LockServiceMXBean getLocalLockServiceMBean(String lockServiceName)
lockServiceName
- Name of the lock service.public abstract DiskStoreMXBean getLocalDiskStoreMBean(String diskStoreName)
diskStoreName
- Name of the disk store.public abstract CacheServerMXBean getLocalCacheServerMXBean(int serverPort)
serverPort
- Port on which the cache server is listening.public abstract DistributedSystemMXBean getDistributedSystemMXBean()
public abstract ManagerMXBean getManagerMXBean()
public abstract DistributedRegionMXBean getDistributedRegionMXBean(String regionPath)
regionPath
- Path of the Region.public abstract DistributedLockServiceMXBean getDistributedLockServiceMXBean(String lockServiceName)
lockServiceName
- Name of the LockService.public abstract GatewayReceiverMXBean getLocalGatewayReceiverMXBean()
public abstract GatewaySenderMXBean getLocalGatewaySenderMXBean(String senderId)
senderId
- ID of the gateway sender.public abstract AsyncEventQueueMXBean getLocalAsyncEventQueueMXBean(String queueId)
queueId
- ID of the asynchronous queue.public abstract LocatorMXBean getLocalLocatorMXBean()
public abstract Set<ObjectName> queryMBeanNames(DistributedMember member)
member
- Member for which to find MBeans.public abstract Set<ObjectName> getAsyncEventQueueMBeanNames(DistributedMember member)
member
- Member for which to find MBeans.public abstract <T> T getMBeanInstance(ObjectName objectName, Class<T> interfaceClass)
ObjectInstance
.T
- the type of MBeanobjectName
- Object name of the MBean.interfaceClass
- Interface which this MBean exposes.ClassCastException
- if the MBean does not implement the given interface.public abstract long getLastUpdateTime(ObjectName objectName)
objectName
- Object name of the MBean.public abstract ObjectName getMemberMBeanName(DistributedMember member)
member
- Distributed member used to generate the object name.public abstract ObjectName getRegionMBeanName(DistributedMember member, String regionPath)
member
- Distributed member used to generate the object name.regionPath
- Path of the region.public abstract ObjectName getDiskStoreMBeanName(DistributedMember member, String diskName)
member
- Distributed member used to generate the object name.diskName
- Name of the disk store.public abstract ObjectName getCacheServerMBeanName(int serverPort, DistributedMember member)
member
- Distributed member used to generate the object name.serverPort
- Port on which the cache server is listening.public abstract ObjectName getLockServiceMBeanName(DistributedMember member, String lockServiceName)
member
- Distributed member used to generate the object name.lockServiceName
- Name of the lock service.public abstract ObjectName getGatewayReceiverMBeanName(DistributedMember member)
member
- Distributed member used to generate the object name.public abstract ObjectName getGatewaySenderMBeanName(DistributedMember member, String gatwaySenderId)
member
- Distributed member used to generate the object name.gatwaySenderId
- ID of the gateway sender.public abstract ObjectName getAsyncEventQueueMBeanName(DistributedMember member, String queueId)
member
- Distributed member used to generate the object name.queueId
- ID of the asynchronous queue.public abstract ObjectName getDistributedRegionMBeanName(String regionName)
regionName
- Name of the region.public abstract ObjectName getDistributedLockServiceMBeanName(String lockService)
lockService
- Name of the lock service.public abstract ObjectName getDistributedSystemMBeanName()
public abstract ObjectName getManagerMBeanName()
public abstract ObjectName getLocatorMBeanName(DistributedMember member)
member
- Distributed member used to generate the object name.public abstract void addMembershipListener(MembershipListener listener)
listener
- the membership listener to registerpublic abstract void removeMembershipListener(MembershipListener listener)
listener
- the membership listener to unregisteraddMembershipListener(org.apache.geode.management.membership.MembershipListener)