|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPoolableProvider
A special extension interface of IManagableProvider
for service providers which
want to request instance pooling.
A provider which prefers instance pooling over the creation of a new instance
for every client lookup should implement this interface.
Whenever possible it is recommended for providers to be registered as singletons.
An IProviderRegistry
implementation is not required to support provider
instance pooling. If pooling is not supported, providers implementing
this interface are handled like normal IManagableProvider
s.
Method Summary | |
---|---|
void |
addedToPool()
Called when a new provider instance is first added to an instance pool. |
void |
leavingPool()
Called shortly before this instance is handed out to a client. |
void |
removedFromPool()
Called shortly before provider instance is removed from the pool and discarded. |
void |
returningToPool()
Called shortly after a client has indicated that it no longer needs this instance and the instance is about to be returned to the pool. |
Methods inherited from interface org.electrocodeogram.cpc.core.api.provider.IManagableProvider |
---|
onLoad, onUnload |
Methods inherited from interface org.electrocodeogram.cpc.core.api.provider.IProvider |
---|
getProviderName, toString |
Method Detail |
---|
void addedToPool()
leavingPool()
and
removedFromPool()
.
A provider implementation can use a call to this method as indication of pooling support in the current provider registry. If the provider is used before this method is called, pooling is not supported.
void removedFromPool()
void leavingPool()
void returningToPool()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |