public class CombinedConnectionSemaphore extends PerHostConnectionSemaphore
ConnectionSemaphore with two limits - a global limit and a per-host limit| Modifier 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) |
getFreeConnectionsForHostprotected final MaxConnectionSemaphore globalMaxConnectionSemaphore
public void acquireChannelLock(Object partitionKey) throws IOException
acquireChannelLock in interface ConnectionSemaphoreacquireChannelLock in class PerHostConnectionSemaphoreIOExceptionprotected void releaseGlobal(Object partitionKey)
protected long acquireGlobal(Object partitionKey) throws IOException
IOExceptionprotected long acquireGlobalTimed(Object partitionKey) throws IOException
IOExceptionpublic void releaseChannelLock(Object partitionKey)
releaseChannelLock in interface ConnectionSemaphorereleaseChannelLock in class PerHostConnectionSemaphoreCopyright © 2020. All rights reserved.