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 int
acquireTimeout
protected Semaphore
freeChannels
protected IOException
tooManyConnections
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquireChannelLock(Object partitionKey)
void
releaseChannelLock(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:
acquireChannelLock
in interfaceConnectionSemaphore
- Throws:
IOException
-
releaseChannelLock
public void releaseChannelLock(Object partitionKey)
- Specified by:
releaseChannelLock
in interfaceConnectionSemaphore
-
-