Package org.atmosphere.pool
Interface PoolableProvider<T extends Broadcaster,U>
- All Superinterfaces:
AtmosphereConfigAware
- All Known Implementing Classes:
BoundedApachePoolableProvider,UnboundedApachePoolableProvider
Implements this interface for provisioning the
PoolableBroadcasterFactory
with Broadcaster- Author:
- Jeanfrancois Arcand
-
Method Summary
Modifier and TypeMethodDescriptionlongCurrent number of active Broadcaster borrowed from the poolReturn aBroadcasterReturn 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 Details
-
borrowBroadcaster
Return aBroadcaster- Parameters:
id- the name of the Broadcaster- Returns:
Broadcaster
-
returnBroadcaster
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
-