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(java.lang.Object partitionKey) |
protected long |
acquireGlobal(java.lang.Object partitionKey) |
protected long |
acquireGlobalTimed(java.lang.Object partitionKey) |
void |
releaseChannelLock(java.lang.Object partitionKey) |
protected void |
releaseGlobal(java.lang.Object partitionKey) |
getFreeConnectionsForHost
protected final MaxConnectionSemaphore globalMaxConnectionSemaphore
public void acquireChannelLock(java.lang.Object partitionKey) throws java.io.IOException
acquireChannelLock
in interface ConnectionSemaphore
acquireChannelLock
in class PerHostConnectionSemaphore
java.io.IOException
protected void releaseGlobal(java.lang.Object partitionKey)
protected long acquireGlobal(java.lang.Object partitionKey) throws java.io.IOException
java.io.IOException
protected long acquireGlobalTimed(java.lang.Object partitionKey) throws java.io.IOException
java.io.IOException
public void releaseChannelLock(java.lang.Object partitionKey)
releaseChannelLock
in interface ConnectionSemaphore
releaseChannelLock
in class PerHostConnectionSemaphore
Copyright © 2019. All Rights Reserved.