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