public class CombinedConnectionSemaphore extends PerHostConnectionSemaphore
ConnectionSemaphore
with two limits - a global limit and a per-host limitModifier and Type | Field and Description |
---|---|
protected MaxConnectionSemaphore |
globalMaxConnectionSemaphore |
acquireTimeout, freeChannelsPerHost, maxConnectionsPerHost, tooManyConnectionsPerHost
Modifier and Type | Method and Description |
---|---|
void |
acquireChannelLock(Object partitionKey) |
protected long |
acquireGlobal(Object partitionKey) |
protected long |
acquireGlobalTimed(Object partitionKey) |
void |
releaseChannelLock(Object partitionKey) |
protected void |
releaseGlobal(Object partitionKey) |
getFreeConnectionsForHost
protected final MaxConnectionSemaphore globalMaxConnectionSemaphore
public void acquireChannelLock(Object partitionKey) throws IOException
acquireChannelLock
in interface ConnectionSemaphore
acquireChannelLock
in class PerHostConnectionSemaphore
IOException
protected void releaseGlobal(Object partitionKey)
protected long acquireGlobal(Object partitionKey) throws IOException
IOException
protected long acquireGlobalTimed(Object partitionKey) throws IOException
IOException
public void releaseChannelLock(Object partitionKey)
releaseChannelLock
in interface ConnectionSemaphore
releaseChannelLock
in class PerHostConnectionSemaphore
Copyright © 2020. All rights reserved.