public class PerHostConnectionSemaphore extends java.lang.Object implements ConnectionSemaphore
Modifier and Type | Field and Description |
---|---|
protected int |
acquireTimeout |
protected java.util.concurrent.ConcurrentHashMap<java.lang.Object,java.util.concurrent.Semaphore> |
freeChannelsPerHost |
protected int |
maxConnectionsPerHost |
protected java.io.IOException |
tooManyConnectionsPerHost |
Modifier and Type | Method and Description |
---|---|
void |
acquireChannelLock(java.lang.Object partitionKey) |
protected java.util.concurrent.Semaphore |
getFreeConnectionsForHost(java.lang.Object partitionKey) |
void |
releaseChannelLock(java.lang.Object partitionKey) |
protected final java.util.concurrent.ConcurrentHashMap<java.lang.Object,java.util.concurrent.Semaphore> freeChannelsPerHost
protected final int maxConnectionsPerHost
protected final java.io.IOException tooManyConnectionsPerHost
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
protected java.util.concurrent.Semaphore getFreeConnectionsForHost(java.lang.Object partitionKey)
Copyright © 2019. All Rights Reserved.