com.sun.grizzly.connectioncache.impl.transport
Class ConnectionCacheBase<C extends Closeable>
java.lang.Object
com.sun.grizzly.connectioncache.impl.transport.ConnectionCacheBase<C>
- All Implemented Interfaces:
- ConnectionCache<C>
- Direct Known Subclasses:
- InboundConnectionCacheBlockingImpl, OutboundConnectionCacheBlockingImpl
public abstract class ConnectionCacheBase<C extends Closeable>
- extends Object
- implements ConnectionCache<C>
logger
protected final Logger logger
reclaimableConnections
protected ConcurrentQueue<C extends Closeable> reclaimableConnections
debug
protected boolean debug()
getCacheType
public final String getCacheType()
- Description copied from interface:
ConnectionCache
- User-provided indentifier for an instance of the
ConnectionCache
.
- Specified by:
getCacheType
in interface ConnectionCache<C extends Closeable>
- Returns:
- a
String
identifying an instance of a ConnectionCache
numberToReclaim
public final int numberToReclaim()
- Description copied from interface:
ConnectionCache
- Number of connections to reclaim each time reclamation starts.
- Specified by:
numberToReclaim
in interface ConnectionCache<C extends Closeable>
- Returns:
- number of connections to reclaim
highWaterMark
public final int highWaterMark()
- Description copied from interface:
ConnectionCache
- Threshold at which connection reclamation begins.
- Specified by:
highWaterMark
in interface ConnectionCache<C extends Closeable>
- Returns:
- threshold at which connection reclamation begins.
thisClassName
protected abstract String thisClassName()
dprint
protected final void dprint(String msg)
toString
public String toString()
- Overrides:
toString
in class Object
dprintStatistics
public void dprintStatistics()
reclaim
protected boolean reclaim()
- Reclaim some idle cached connections. Will never
close a connection that is busy.
- Returns:
- any connections reclaimed, (yes or no)
Copyright © 2011 SUN Microsystems. All Rights Reserved.