|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sadun.util.pool.ManagedObjectPool
Constructor Summary | |
|
ManagedObjectPool()
|
protected |
ManagedObjectPool(int size,
java.lang.String factoryClassName)
Subclasses (which handles more specific object pools) may directly specify default size and factory class name. |
Method Summary | |
java.lang.String |
getClassName()
|
java.lang.String |
getFactoryClassName()
Return the name of the pool's factory class, or null if no factory class is employed. |
int |
getFreeCount()
Return the number of available objects in the pool |
java.lang.Class |
getObjectType()
Return the object type pooled by this pool |
int |
getSize()
Return the size of the pool |
int |
getUsedCount()
Return the number of used objects in the pool |
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
|
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer arg0,
javax.management.ObjectName arg1)
|
void |
setClassName(java.lang.String className)
Set the name of the class to produce. |
void |
setFactoryClassName(java.lang.String factoryClassName)
Set the name of the pool's factory class. |
void |
setSize(int size)
Set the pool size. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ManagedObjectPool()
protected ManagedObjectPool(int size, java.lang.String factoryClassName)
size
- factoryClassName
- Method Detail |
public java.lang.String getFactoryClassName()
getFactoryClassName
in interface ManagedObjectPoolMBean
public void setFactoryClassName(java.lang.String factoryClassName) throws javax.management.MBeanException
This property cannot be changed if some client has already acquired pooled objects.
setFactoryClassName
in interface ManagedObjectPoolMBean
factoryClassName
- the new factory class name
javax.management.MBeanException
public void setSize(int size) throws javax.management.MBeanException
This property cannot be changed if some client has already acquired pooled objects.
setSize
in interface ManagedObjectPoolMBean
size
- the new size
javax.management.MBeanException
public void setClassName(java.lang.String className) throws javax.management.MBeanException
This property cannot be changed if some client has already acquired pooled objects.
className
- the name of the class of the objects to pool.
javax.management.MBeanException
public int getFreeCount()
ManagedObjectPoolMBean
getFreeCount
in interface ManagedObjectPoolMBean
ManagedObjectPoolMBean.getFreeCount()
public java.lang.Class getObjectType()
ManagedObjectPoolMBean
getObjectType
in interface ManagedObjectPoolMBean
public int getSize()
ManagedObjectPoolMBean
getSize
in interface ManagedObjectPoolMBean
public int getUsedCount()
ManagedObjectPoolMBean
getUsedCount
in interface ManagedObjectPoolMBean
public java.lang.String getClassName()
public void postDeregister()
postDeregister
in interface javax.management.MBeanRegistration
public void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
public void preDeregister() throws java.lang.Exception
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
public javax.management.ObjectName preRegister(javax.management.MBeanServer arg0, javax.management.ObjectName arg1) throws java.lang.Exception
preRegister
in interface javax.management.MBeanRegistration
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |