public class MaxConnectionSemaphore extends java.lang.Object implements ConnectionSemaphore
Modifier and Type | Field and Description |
---|---|
protected int |
acquireTimeout |
protected java.util.concurrent.Semaphore |
freeChannels |
protected java.io.IOException |
tooManyConnections |
Modifier and Type | Method and Description |
---|---|
void |
acquireChannelLock(java.lang.Object partitionKey) |
void |
releaseChannelLock(java.lang.Object partitionKey) |
protected final java.util.concurrent.Semaphore freeChannels
protected final java.io.IOException tooManyConnections
protected final int acquireTimeout
public void acquireChannelLock(java.lang.Object partitionKey) throws java.io.IOException
acquireChannelLock
in interface ConnectionSemaphore
java.io.IOException
public void releaseChannelLock(java.lang.Object partitionKey)
releaseChannelLock
in interface ConnectionSemaphore
Copyright © 2019. All Rights Reserved.