|
||||||||||
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.OutboundConnectionCacheBlockingImpl<C>
public final class OutboundConnectionCacheBlockingImpl<C extends Connection>
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 | |
---|---|
OutboundConnectionCacheBlockingImpl(java.lang.String cacheType,
int highWaterMark,
int numberToReclaim,
int maxParallelConnections,
java.util.logging.Logger logger)
|
Method Summary | |
---|---|
boolean |
canCreateNewConnection(ContactInfo<C> cinfo)
Determine whether a new connection could be created by the ConnectionCache or not. |
void |
close(C conn)
Close a connection, regardless of whether the connection is busy or not. |
C |
get(ContactInfo<C> cinfo)
Behaves the same as get( ContactInfo |
C |
get(ContactInfo<C> cinfo,
ConnectionFinder<C> finder)
Return a Connection corresponding to the given ContactInfo. |
com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.ConnectionState<C> |
getConnectionState(ContactInfo<C> cinfo,
com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.CacheEntry<C> entry,
C conn)
|
int |
maxParallelConnections()
Configured maximum number of connections supported per ContactInfo. |
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 |
release(C conn,
int numResponsesExpected)
Release a Connection previously obtained from get. |
void |
responseReceived(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 OutboundConnectionCacheBlockingImpl(java.lang.String cacheType, int highWaterMark, int numberToReclaim, int maxParallelConnections, java.util.logging.Logger logger)
Method Detail |
---|
public int maxParallelConnections()
OutboundConnectionCache
maxParallelConnections
in interface OutboundConnectionCache<C extends Connection>
protected java.lang.String thisClassName()
thisClassName
in class ConnectionCacheBase<C extends Connection>
public boolean canCreateNewConnection(ContactInfo<C> cinfo)
OutboundConnectionCache
canCreateNewConnection
in interface OutboundConnectionCache<C extends Connection>
public C get(ContactInfo<C> cinfo) throws java.io.IOException
OutboundConnectionCache
get
in interface OutboundConnectionCache<C extends Connection>
java.io.IOException
public com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.ConnectionState<C> getConnectionState(ContactInfo<C> cinfo, com.sun.xml.ws.transport.tcp.connectioncache.impl.transport.OutboundConnectionCacheBlockingImpl.CacheEntry<C> entry, C conn)
public C get(ContactInfo<C> cinfo, ConnectionFinder<C> finder) throws java.io.IOException
OutboundConnectionCache
It is possible that the cache contains connections that no longer connect to their destination. In this case, it is the responsibility of the client of the cache to close the broken connection as they are detected. Connection reclamation may also handle the cleanup, but note that a broken connection with pending responses will never be reclaimed.
Note that the idle and busy connection collections that are passed to the finder are unmodifiable collections. They have iterators that return connections in LRU order, with the least recently used connection first. This is done to aid a finder that wishes to consider load balancing in its determination of an appropriate connection.
get
in interface OutboundConnectionCache<C extends Connection>
java.io.IOException
public void release(C conn, int numResponsesExpected)
OutboundConnectionCache
release
in interface OutboundConnectionCache<C extends Connection>
public void responseReceived(C conn)
responseReceived
in interface OutboundConnectionCache<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 |