Package org.atmosphere.pool
Interface PoolableProvider<T extends Broadcaster,U>
-
- All Superinterfaces:
AtmosphereConfigAware
- All Known Implementing Classes:
BoundedApachePoolableProvider,UnboundedApachePoolableProvider
public interface PoolableProvider<T extends Broadcaster,U> extends AtmosphereConfigAware
Implements this interface for provisioning thePoolableBroadcasterFactorywithBroadcaster- Author:
- Jeanfrancois Arcand
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longactiveBroadcaster()Current number of active Broadcaster borrowed from the poolTborrowBroadcaster(java.lang.Object id)Return aBroadcasterUimplementation()Return the current native pool implementation.longpoolSize()The current Pool Size<T extends Broadcaster,U>
PoolableProviderreturnBroadcaster(T b)Return a destroyedBroadcasterinstance.-
Methods inherited from interface org.atmosphere.inject.AtmosphereConfigAware
configure
-
-
-
-
Method Detail
-
borrowBroadcaster
T borrowBroadcaster(java.lang.Object id)
Return aBroadcaster- Parameters:
id- the name of the Broadcaster- Returns:
Broadcaster
-
returnBroadcaster
<T extends Broadcaster,U> PoolableProvider returnBroadcaster(T b)
Return a destroyedBroadcasterinstance.- Parameters:
b-Broadcaster- Returns:
- this
-
poolSize
long poolSize()
The current Pool Size- Returns:
- current Pool size
-
activeBroadcaster
long activeBroadcaster()
Current number of active Broadcaster borrowed from the pool
-
implementation
U implementation()
Return the current native pool implementation. For example, the GenericObjectPool from Apache Common will be returned if theUnboundedApachePoolableProvideris used.- Returns:
- the current native pool implementation
-
-