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 ConnectionSemaphore
IOException
public void releaseChannelLock(Object partitionKey)
releaseChannelLock
in interface ConnectionSemaphore
Copyright © 2019. All rights reserved.