Package org.eclipse.net4j.buffer
Interface IBufferPool
- All Superinterfaces:
IBufferProvider
- All Known Subinterfaces:
IBufferPool.Introspection
Provides clients with the ability to obtain and retain pooled
IBuffer
s.- Author:
- Eike Stepper
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Offers additional introspection features forIBufferPool
s.Nested classes/interfaces inherited from interface org.eclipse.net4j.buffer.IBufferProvider
IBufferProvider.Notification
-
Method Summary
Methods inherited from interface org.eclipse.net4j.buffer.IBufferProvider
getBufferCapacity, provideBuffer, retainBuffer
-
Method Details
-
evictOne
boolean evictOne()Tries to remove a single buffer from thisBufferPool
andrelease
it.- Returns:
true
if a buffer could be evicted,false
otherwise.
-
evict
int evict(int survivors) Tries to remove as many buffers from thisBufferPool
andrelease
them as are needed to let a given maximum number of buffers survive in the pool.- Returns:
- The number of buffers that could be evicted.
-