Class PerHostConnectionSemaphore
- java.lang.Object
- 
- org.asynchttpclient.netty.channel.PerHostConnectionSemaphore
 
- 
- All Implemented Interfaces:
- ConnectionSemaphore
 - Direct Known Subclasses:
- CombinedConnectionSemaphore
 
 public class PerHostConnectionSemaphore extends Object implements ConnectionSemaphore Max per-host connections limiter.
- 
- 
Field SummaryFields Modifier and Type Field Description protected intacquireTimeoutprotected ConcurrentHashMap<Object,Semaphore>freeChannelsPerHostprotected intmaxConnectionsPerHostprotected IOExceptiontooManyConnectionsPerHost
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacquireChannelLock(Object partitionKey)protected SemaphoregetFreeConnectionsForHost(Object partitionKey)voidreleaseChannelLock(Object partitionKey)
 
- 
- 
- 
Field Detail- 
freeChannelsPerHostprotected final ConcurrentHashMap<Object,Semaphore> freeChannelsPerHost 
 - 
maxConnectionsPerHostprotected final int maxConnectionsPerHost 
 - 
tooManyConnectionsPerHostprotected final IOException tooManyConnectionsPerHost 
 - 
acquireTimeoutprotected final int acquireTimeout 
 
- 
 - 
Method Detail- 
acquireChannelLockpublic void acquireChannelLock(Object partitionKey) throws IOException - Specified by:
- acquireChannelLockin interface- ConnectionSemaphore
- Throws:
- IOException
 
 - 
releaseChannelLockpublic void releaseChannelLock(Object partitionKey) - Specified by:
- releaseChannelLockin interface- ConnectionSemaphore
 
 
- 
 
-