public class PerHostConnectionSemaphore extends Object implements ConnectionSemaphore
| Modifier and Type | Field and Description |
|---|---|
protected int |
acquireTimeout |
protected ConcurrentHashMap<Object,Semaphore> |
freeChannelsPerHost |
protected int |
maxConnectionsPerHost |
protected IOException |
tooManyConnectionsPerHost |
| Modifier and Type | Method and Description |
|---|---|
void |
acquireChannelLock(Object partitionKey) |
protected Semaphore |
getFreeConnectionsForHost(Object partitionKey) |
void |
releaseChannelLock(Object partitionKey) |
protected final ConcurrentHashMap<Object,Semaphore> freeChannelsPerHost
protected final int maxConnectionsPerHost
protected final IOException tooManyConnectionsPerHost
protected final int acquireTimeout
public void acquireChannelLock(Object partitionKey) throws IOException
acquireChannelLock in interface ConnectionSemaphoreIOExceptionpublic void releaseChannelLock(Object partitionKey)
releaseChannelLock in interface ConnectionSemaphoreCopyright © 2021. All rights reserved.