Class MaxConnectionSemaphore
- java.lang.Object
-
- org.asynchttpclient.netty.channel.MaxConnectionSemaphore
-
- All Implemented Interfaces:
ConnectionSemaphore
public class MaxConnectionSemaphore extends Object implements ConnectionSemaphore
Max connections limiter.- Author:
- Stepan Koltsov, Alex Maltinsky
-
-
Field Summary
Fields Modifier and Type Field Description protected intacquireTimeoutprotected SemaphorefreeChannelsprotected IOExceptiontooManyConnections
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacquireChannelLock(Object partitionKey)voidreleaseChannelLock(Object partitionKey)
-
-
-
Field Detail
-
freeChannels
protected final Semaphore freeChannels
-
tooManyConnections
protected final IOException tooManyConnections
-
acquireTimeout
protected final int acquireTimeout
-
-
Method Detail
-
acquireChannelLock
public void acquireChannelLock(Object partitionKey) throws IOException
- Specified by:
acquireChannelLockin interfaceConnectionSemaphore- Throws:
IOException
-
releaseChannelLock
public void releaseChannelLock(Object partitionKey)
- Specified by:
releaseChannelLockin interfaceConnectionSemaphore
-
-