Class CombinedConnectionSemaphore
- java.lang.Object
-
- org.asynchttpclient.netty.channel.PerHostConnectionSemaphore
-
- org.asynchttpclient.netty.channel.CombinedConnectionSemaphore
-
- All Implemented Interfaces:
ConnectionSemaphore
public class CombinedConnectionSemaphore extends PerHostConnectionSemaphore
A combinedConnectionSemaphorewith two limits - a global limit and a per-host limit
-
-
Field Summary
Fields Modifier and Type Field Description protected MaxConnectionSemaphoreglobalMaxConnectionSemaphore-
Fields inherited from class org.asynchttpclient.netty.channel.PerHostConnectionSemaphore
acquireTimeout, freeChannelsPerHost, maxConnectionsPerHost, tooManyConnectionsPerHost
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacquireChannelLock(Object partitionKey)protected longacquireGlobal(Object partitionKey)protected longacquireGlobalTimed(Object partitionKey)voidreleaseChannelLock(Object partitionKey)protected voidreleaseGlobal(Object partitionKey)-
Methods inherited from class org.asynchttpclient.netty.channel.PerHostConnectionSemaphore
getFreeConnectionsForHost
-
-
-
-
Field Detail
-
globalMaxConnectionSemaphore
protected final MaxConnectionSemaphore globalMaxConnectionSemaphore
-
-
Method Detail
-
acquireChannelLock
public void acquireChannelLock(Object partitionKey) throws IOException
- Specified by:
acquireChannelLockin interfaceConnectionSemaphore- Overrides:
acquireChannelLockin classPerHostConnectionSemaphore- Throws:
IOException
-
releaseGlobal
protected void releaseGlobal(Object partitionKey)
-
acquireGlobal
protected long acquireGlobal(Object partitionKey) throws IOException
- Throws:
IOException
-
acquireGlobalTimed
protected long acquireGlobalTimed(Object partitionKey) throws IOException
- Throws:
IOException
-
releaseChannelLock
public void releaseChannelLock(Object partitionKey)
- Specified by:
releaseChannelLockin interfaceConnectionSemaphore- Overrides:
releaseChannelLockin classPerHostConnectionSemaphore
-
-