|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.gargoylesoftware.base.resource.ResourceFactory
com.gargoylesoftware.base.resource.PooledResourceFactory
A resource factory that provides object pooling
| Constructor Summary | |
PooledResourceFactory(ResourceFactory sourceFactory)
Create an instance |
|
| Method Summary | |
int |
getPreferredCacheSize()
Return the preferredCacheSize |
protected ManagedResource |
getResourceImpl(ResourceManager resourceManager)
Get a resource |
boolean |
reinitializeResourceIfPossible(ManagedResource resource)
Reinitialize the resource to a known state. |
protected void |
releaseResourceImpl(ResourceManager resourceManager,
ManagedResource resource)
Release a resource |
void |
setPreferredCacheSize(int size)
Set the preferredCacheSize |
| Methods inherited from class com.gargoylesoftware.base.resource.ResourceFactory |
getResource, releaseAllResources, releaseResource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PooledResourceFactory(ResourceFactory sourceFactory)
sourceFactory - The factory that will be used to actually create
and destroy the pooled resources| Method Detail |
public void setPreferredCacheSize(int size)
size - The new size. May not be negativepublic int getPreferredCacheSize()
public boolean reinitializeResourceIfPossible(ManagedResource resource)
reinitializeResourceIfPossible in class ResourceFactoryresource - the resource to reinitialize
protected ManagedResource getResourceImpl(ResourceManager resourceManager)
throws Exception
getResourceImpl in class ResourceFactoryresourceManager - The manager that owns this factory
Exception - If an error occurs
protected void releaseResourceImpl(ResourceManager resourceManager,
ManagedResource resource)
throws Exception
releaseResourceImpl in class ResourceFactoryresource - The resource to releaseresourceManager - The manager that owns this factory
Exception - If an error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||