Package org.jumpmind.symmetric.transport
Class ConcurrentConnectionManager
java.lang.Object
org.jumpmind.symmetric.transport.ConcurrentConnectionManager
- All Implemented Interfaces:
IConcurrentConnectionManager
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.jumpmind.symmetric.transport.IConcurrentConnectionManager
IConcurrentConnectionManager.ReservationStatus, IConcurrentConnectionManager.ReservationType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,Map<String, ConcurrentConnectionManager.Reservation>> protected IParameterService -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentConnectionManager(IParameterService parameterService, IStatisticManager statisticManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToWhitelist(String nodeId) intgetReservationCount(String poolId) static StringgetReservationIdentifier(String nodeId, String channelId) getReservationsByNodeId(String urlPath) String[]protected voidlogConnectedTimePeriod(String nodeId, long startMs, long endMs, String poolId) protected voidlogTooBusyRejection(String nodeId, String poolId) booleanreleaseConnection(String nodeId, String poolId) booleanreleaseConnection(String nodeId, String channelId, String poolId) voidremoveFromWhiteList(String nodeId) protected voidreserveConnection(String nodeId, String channelId, String poolId, IConcurrentConnectionManager.ReservationType reservationRequest, boolean requiresExistingReservation) protected booleanshouldLogTransportError(String nodeId)
-
Field Details
-
parameterService
-
activeReservationsByNodeByPool
protected Map<String,Map<String, activeReservationsByNodeByPoolConcurrentConnectionManager.Reservation>> -
nodeConnectionStatistics
protected Map<String,Map<String, nodeConnectionStatisticsConcurrentConnectionManager.NodeConnectionStatistics>> -
whiteList
-
transportErrorTimeByNode
-
-
Constructor Details
-
ConcurrentConnectionManager
public ConcurrentConnectionManager(IParameterService parameterService, IStatisticManager statisticManager)
-
-
Method Details
-
logTooBusyRejection
-
logConnectedTimePeriod
-
releaseConnection
- Specified by:
releaseConnectionin interfaceIConcurrentConnectionManager
-
releaseConnection
- Specified by:
releaseConnectionin interfaceIConcurrentConnectionManager
-
addToWhitelist
- Specified by:
addToWhitelistin interfaceIConcurrentConnectionManager
-
removeFromWhiteList
- Specified by:
removeFromWhiteListin interfaceIConcurrentConnectionManager
-
getWhiteList
- Specified by:
getWhiteListin interfaceIConcurrentConnectionManager
-
getReservationCount
- Specified by:
getReservationCountin interfaceIConcurrentConnectionManager
-
reserveConnection
public IConcurrentConnectionManager.ReservationStatus reserveConnection(String nodeId, String channelId, String poolId, IConcurrentConnectionManager.ReservationType reservationRequest, boolean requiresExistingReservation) - Specified by:
reserveConnectionin interfaceIConcurrentConnectionManagerreservationRequest- if true then hold onto reservation for the time it typically takes for a node to reconnect after the initial request. Otherwise, we know that the node has actually connected for activity.- Returns:
- true if the connection has been reserved and the node is meant to proceed with its current operation.
-
getPullReservationsByNodeId
- Specified by:
getPullReservationsByNodeIdin interfaceIConcurrentConnectionManager
-
getPushReservationsByNodeId
- Specified by:
getPushReservationsByNodeIdin interfaceIConcurrentConnectionManager
-
getReservationsByNodeId
-
removeTimedOutReservations
protected void removeTimedOutReservations(Map<String, ConcurrentConnectionManager.Reservation> reservations) -
getReservationIdentifier
-
getNodeConnectionStatisticsByPoolByNodeId
public Map<String,Map<String, getNodeConnectionStatisticsByPoolByNodeId()ConcurrentConnectionManager.NodeConnectionStatistics>> - Specified by:
getNodeConnectionStatisticsByPoolByNodeIdin interfaceIConcurrentConnectionManager
-
shouldLogTransportError
-
getActiveReservationsByNodeByPool
public Map<String,Map<String, getActiveReservationsByNodeByPool()ConcurrentConnectionManager.Reservation>> - Specified by:
getActiveReservationsByNodeByPoolin interfaceIConcurrentConnectionManager
-