Class ConnectionCacheBase<C extends Connection>
java.lang.Object
com.sun.corba.ee.impl.transport.connection.ConnectionCacheBase<C>
- All Implemented Interfaces:
ConnectionCache<C>
- Direct Known Subclasses:
ConnectionCacheBlockingBase
,ConnectionCacheNonBlockingBase
public abstract class ConnectionCacheBase<C extends Connection>
extends Object
implements ConnectionCache<C>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private boolean
private final int
private final int
protected ConcurrentQueue
<C> -
Constructor Summary
ConstructorsConstructorDescriptionConnectionCacheBase
(String cacheType, int highWaterMark, int numberToReclaim) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
final String
User-provided identifier for an instance of the OutboundConnectionCache.final int
Threshold at which connection reclamation begins.final int
Number of connections to reclaim each time reclamation starts.protected boolean
reclaim()
Reclaim some idle cached connections.protected abstract String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sun.corba.ee.spi.transport.connection.ConnectionCache
close, numberOfBusyConnections, numberOfConnections, numberOfIdleConnections, numberOfReclaimableConnections
-
Field Details
-
flag
private boolean flag -
cacheType
-
highWaterMark
private final int highWaterMark -
numberToReclaim
private final int numberToReclaim -
reclaimableConnections
-
-
Constructor Details
-
ConnectionCacheBase
ConnectionCacheBase(String cacheType, int highWaterMark, int numberToReclaim)
-
-
Method Details
-
getCacheType
Description copied from interface:ConnectionCache
User-provided identifier for an instance of the OutboundConnectionCache.- Specified by:
getCacheType
in interfaceConnectionCache<C extends Connection>
- Returns:
- identifier String
-
numberToReclaim
public final int numberToReclaim()Description copied from interface:ConnectionCache
Number of connections to reclaim each time reclamation starts.- Specified by:
numberToReclaim
in interfaceConnectionCache<C extends Connection>
- Returns:
- number to reclaim
-
highWaterMark
public final int highWaterMark()Description copied from interface:ConnectionCache
Threshold at which connection reclamation begins.- Specified by:
highWaterMark
in interfaceConnectionCache<C extends Connection>
- Returns:
- threshold
-
thisClassName
-
toString
-
display
-
reclaim
protected boolean reclaim()Reclaim some idle cached connections. Will never close a connection that is busy.- Returns:
- True if at least one connection was reclaimed
-