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 class
static class
Nested 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 TypeMethodDescriptionvoid
addToWhitelist
(String nodeId) int
getReservationCount
(String poolId) static String
getReservationIdentifier
(String nodeId, String channelId) getReservationsByNodeId
(String urlPath) String[]
protected void
logConnectedTimePeriod
(String nodeId, long startMs, long endMs, String poolId) protected void
logTooBusyRejection
(String nodeId, String poolId) boolean
releaseConnection
(String nodeId, String poolId) boolean
releaseConnection
(String nodeId, String channelId, String poolId) void
removeFromWhiteList
(String nodeId) protected void
reserveConnection
(String nodeId, String channelId, String poolId, IConcurrentConnectionManager.ReservationType reservationRequest, boolean requiresExistingReservation) protected boolean
shouldLogTransportError
(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:
releaseConnection
in interfaceIConcurrentConnectionManager
-
releaseConnection
- Specified by:
releaseConnection
in interfaceIConcurrentConnectionManager
-
addToWhitelist
- Specified by:
addToWhitelist
in interfaceIConcurrentConnectionManager
-
removeFromWhiteList
- Specified by:
removeFromWhiteList
in interfaceIConcurrentConnectionManager
-
getWhiteList
- Specified by:
getWhiteList
in interfaceIConcurrentConnectionManager
-
getReservationCount
- Specified by:
getReservationCount
in interfaceIConcurrentConnectionManager
-
reserveConnection
public IConcurrentConnectionManager.ReservationStatus reserveConnection(String nodeId, String channelId, String poolId, IConcurrentConnectionManager.ReservationType reservationRequest, boolean requiresExistingReservation) - Specified by:
reserveConnection
in interfaceIConcurrentConnectionManager
reservationRequest
- 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:
getPullReservationsByNodeId
in interfaceIConcurrentConnectionManager
-
getPushReservationsByNodeId
- Specified by:
getPushReservationsByNodeId
in interfaceIConcurrentConnectionManager
-
getReservationsByNodeId
-
removeTimedOutReservations
protected void removeTimedOutReservations(Map<String, ConcurrentConnectionManager.Reservation> reservations) -
getReservationIdentifier
-
getNodeConnectionStatisticsByPoolByNodeId
public Map<String,Map<String, getNodeConnectionStatisticsByPoolByNodeId()ConcurrentConnectionManager.NodeConnectionStatistics>> - Specified by:
getNodeConnectionStatisticsByPoolByNodeId
in interfaceIConcurrentConnectionManager
-
shouldLogTransportError
-
getActiveReservationsByNodeByPool
public Map<String,Map<String, getActiveReservationsByNodeByPool()ConcurrentConnectionManager.Reservation>> - Specified by:
getActiveReservationsByNodeByPool
in interfaceIConcurrentConnectionManager
-