FileDocCategorySizeDatePackage
PoolObjectFactory.javaAPI DocApache Lucene 2.1.01871Wed Feb 14 10:46:04 GMT 2007org.apache.lucene.gdata.utils

PoolObjectFactory

public interface PoolObjectFactory

This interface enables {@link org.apache.lucene.gdata.utils.Pool} users to build a custom creation and destroy mechanismn for pooled objects. Implementations can use standart creation to prevent the pool from using reflection to create objects of the specific type. This implementation seperates the Pool implementation from the creation or the destruction of a pooled type.

The destroy method can be used to close datasource connections or release resources if the object will be removed from the pool

see
org.apache.lucene.gdata.utils.Pool
author
Simon Willnauer
param
- the type to be created

Fields Summary
Constructors Summary
Methods Summary
public abstract voiddestroyInstance(Type type)
destroys the given instance

param
type - the object to destroy / release all resources

public abstract TypegetInstance()

return
an instance of the specified Type