Package org.apache.uima.util.impl
Class CasPoolManagementImpl
- java.lang.Object
-
- org.apache.uima.util.impl.CasPoolManagementImpl
-
- All Implemented Interfaces:
ManagementObject,CasPoolManagement,CasPoolManagementImplMBean
public class CasPoolManagementImpl extends java.lang.Object implements CasPoolManagement, CasPoolManagementImplMBean
Implements Monitoring/Management interface to a CasPool.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ref.WeakReference<CasPool>mCasPoolRefprivate java.lang.StringmUniqueMBeanName
-
Constructor Summary
Constructors Constructor Description CasPoolManagementImpl(CasPool aCasPool, java.lang.String aUniqueMBeanName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAvailableInstances()Get the number of CAS instances currently available in the pool.intgetPoolSize()Get the total size of the CAS Pool.java.lang.StringgetUniqueMBeanName()Gets a valid JMX MBean name that is unique among all ManagementObjects in this JVM.
-
-
-
Field Detail
-
mCasPoolRef
private java.lang.ref.WeakReference<CasPool> mCasPoolRef
-
mUniqueMBeanName
private java.lang.String mUniqueMBeanName
-
-
Constructor Detail
-
CasPoolManagementImpl
public CasPoolManagementImpl(CasPool aCasPool, java.lang.String aUniqueMBeanName)
-
-
Method Detail
-
getAvailableInstances
public int getAvailableInstances()
Description copied from interface:CasPoolManagementGet the number of CAS instances currently available in the pool.- Specified by:
getAvailableInstancesin interfaceCasPoolManagement- Specified by:
getAvailableInstancesin interfaceCasPoolManagementImplMBean- Returns:
- the number of available CAS instances
-
getPoolSize
public int getPoolSize()
Description copied from interface:CasPoolManagementGet the total size of the CAS Pool.- Specified by:
getPoolSizein interfaceCasPoolManagement- Specified by:
getPoolSizein interfaceCasPoolManagementImplMBean- Returns:
- the pool size
-
getUniqueMBeanName
public java.lang.String getUniqueMBeanName()
Description copied from interface:ManagementObjectGets a valid JMX MBean name that is unique among all ManagementObjects in this JVM. (Technically, it is unique only among ManagementObjects objects loaded by the same ClassLoader, which is whatever ClassLoader was used to load the UIMA Framework classes.)If you are running with JRE 1.5, this is the name used to register this object with the platform MBeanServer.
- Specified by:
getUniqueMBeanNamein interfaceManagementObject- Returns:
- a unique MBean name
-
-