|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.transport.tcp.connectioncache.impl.transport.ConnectionCacheBase<C>
com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.InboundConnectionCacheBlockingImpl<C>
public final class InboundConnectionCacheBlockingImpl<C extends Connection>
Manage connections that are initiated from another VM.
Field Summary | |
---|---|
protected int |
totalBusy
|
protected int |
totalIdle
|
Fields inherited from class com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.ConnectionCacheBase |
---|
logger, reclaimableConnections |
Constructor Summary | |
---|---|
InboundConnectionCacheBlockingImpl(java.lang.String cacheType,
int highWaterMark,
int numberToReclaim,
java.util.logging.Logger logger)
|
Method Summary | |
---|---|
void |
close(C conn)
Close a connection, regardless of whether the connection is busy or not. |
long |
numberOfBusyConnections()
Number of non-idle connections. |
long |
numberOfConnections()
Total number of connections currently managed by the cache. |
long |
numberOfIdleConnections()
Number of idle connections; that is, connections for which the number of get/release or responseReceived/responseProcessed calls are equal. |
long |
numberOfReclaimableConnections()
Number of idle connections that are reclaimable. |
void |
requestProcessed(C conn,
int numResponsesExpected)
Indicate that request processing has been completed for a request received on conn. |
void |
requestReceived(C conn)
Mark a connection as busy because a request is being processed on the connection. |
void |
responseSent(C conn)
Decrement the number of expected responses. |
protected java.lang.String |
thisClassName()
|
Methods inherited from class com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.ConnectionCacheBase |
---|
debug, dprint, dprintStatistics, getCacheType, highWaterMark, numberToReclaim, reclaim, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.sun.xml.ws.transport.tcp.connectioncache.spi.transport.ConnectionCache |
---|
getCacheType, highWaterMark, numberOfBusyConnections, numberOfConnections, numberOfIdleConnections, numberOfReclaimableConnections, numberToReclaim |
Field Detail |
---|
protected int totalBusy
protected int totalIdle
Constructor Detail |
---|
public InboundConnectionCacheBlockingImpl(java.lang.String cacheType, int highWaterMark, int numberToReclaim, java.util.logging.Logger logger)
Method Detail |
---|
protected java.lang.String thisClassName()
thisClassName
in class ConnectionCacheBase<C extends Connection>
public void requestReceived(C conn)
InboundConnectionCache
Note that this problem is inherent in a distributed system. We could in any case reclaim a connection AFTER a client has sent a request but BEFORE the request is received. Note that AFTER and BEFORE refer to global time which does not really exist in a distributed system (or at least we want to pretend it is not available). XXX Should we age out connections? This would require actual time stamps, rather than just an LRU queue.
requestReceived
in interface InboundConnectionCache<C extends Connection>
public void requestProcessed(C conn, int numResponsesExpected)
InboundConnectionCache
requestProcessed
in interface InboundConnectionCache<C extends Connection>
public void responseSent(C conn)
responseSent
in interface InboundConnectionCache<C extends Connection>
public void close(C conn)
close
in interface ConnectionCache<C extends Connection>
public long numberOfConnections()
ConnectionCache
public long numberOfIdleConnections()
ConnectionCache
public long numberOfBusyConnections()
ConnectionCache
public long numberOfReclaimableConnections()
ConnectionCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |