Class NodeCommunicationService
java.lang.Object
org.jumpmind.symmetric.service.impl.AbstractService
org.jumpmind.symmetric.service.impl.NodeCommunicationService
- All Implemented Interfaces:
INodeCommunicationService,IService
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jumpmind.symmetric.service.INodeCommunicationService
INodeCommunicationService.INodeCommunicationExecutor -
Field Summary
Fields inherited from class org.jumpmind.symmetric.service.impl.AbstractService
log, parameterService, platform, sqlTemplate, sqlTemplateDirty, symmetricDialect, tablePrefix -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandelete(NodeCommunication nodeCommunication) booleanexecute(NodeCommunication nodeCommunication, RemoteNodeStatuses statuses, INodeCommunicationService.INodeCommunicationExecutor executor) protected List<NodeCommunication>filterForChannelThreading(List<Node> nodesToCommunicateWith, NodeCommunication.CommunicationType communicationType, IReloadQueueThreadAssigner extension) find(String nodeId, String queue, NodeCommunication.CommunicationType communicationType) protected List<NodeCommunication>find(NodeCommunication.CommunicationType communicationType) intgetAvailableThreads(NodeCommunication.CommunicationType communicationType) protected ThreadPoolExecutorgetExecutor(NodeCommunication.CommunicationType communicationType) protected ThreadPoolExecutorgetExecutor(NodeCommunication.CommunicationType communicationType, String threadChannelId) protected DategetLockTimeoutDate(NodeCommunication.CommunicationType communicationType) getNodesToCommunicateWithOffline(NodeCommunication.CommunicationType communicationType) list(NodeCommunication.CommunicationType communicationType) protected List<NodeCommunication>list(NodeCommunication.CommunicationType communicationType, boolean onlyNodesWithChanges) listAll(NodeCommunication.CommunicationType communicationType) protected booleanlock(NodeCommunication nodeCommunication, Date lockTime) protected voidmultiplyNodeCommunicationByQueues(Node node, List<NodeCommunication> nodeCommunications, HashSet<String> queues) parseQueueToBatchCounts(String channelToBatchCountsString) voidprotected voidremoveInvalidQueues(NodeCommunication.CommunicationType communicationType, List<NodeCommunication> communicationRows, Map<String, NodeCommunication> nodesToCommunicateWithListMap, IReloadQueueThreadAssigner extension) protected List<NodeCommunication>removeNodesWithNoBatchesToSend(List<NodeCommunication> nodeCommunications) removeOfflineNodes(List<Node> nodes) protected voidsave(NodeCommunication nodeCommunication, boolean force) protected voidsortNodeCommunications(List<NodeCommunication> list, NodeCommunication.CommunicationType communicationType) voidstop()protected voidunlock(NodeCommunication nodeCommunication, boolean failed, long ts) voidupdateBatchToSendCounts(String nodeId, Map<String, Integer> batchesCountToQueues) Methods inherited from class org.jumpmind.symmetric.service.impl.AbstractService
assertNotNull, buildBatchOrderBy, buildBatchParams, buildBatchWhere, buildBatchWhereFromFilter, close, createSqlReplacementTokens, getJdbcTemplate, getParameterService, getSql, getSymmetricDialect, getTablePrefix, getTargetDialect, getTargetPlatform, getTargetPlatform, isCalledFromSymmetricAdminTool, isSet, isStreamClosedByClient, isSymmetricTable, logOnce, maxDate, readAcks, sendAck, setSqlMap, synchronize, toNodeIds, toNodeIds
-
Constructor Details
-
NodeCommunicationService
-
-
Method Details
-
persistToTableForSnapshot
public void persistToTableForSnapshot()- Specified by:
persistToTableForSnapshotin interfaceINodeCommunicationService
-
find
public NodeCommunication find(String nodeId, String queue, NodeCommunication.CommunicationType communicationType) - Specified by:
findin interfaceINodeCommunicationService
-
find
-
list
- Specified by:
listin interfaceINodeCommunicationService
-
listAll
- Specified by:
listAllin interfaceINodeCommunicationService
-
list
protected List<NodeCommunication> list(NodeCommunication.CommunicationType communicationType, boolean onlyNodesWithChanges) -
removeInvalidQueues
protected void removeInvalidQueues(NodeCommunication.CommunicationType communicationType, List<NodeCommunication> communicationRows, Map<String, NodeCommunication> nodesToCommunicateWithListMap, IReloadQueueThreadAssigner extension) -
getNodeIdsWithUnsentCount
-
filterForChannelThreading
protected List<NodeCommunication> filterForChannelThreading(List<Node> nodesToCommunicateWith, NodeCommunication.CommunicationType communicationType, IReloadQueueThreadAssigner extension) -
multiplyNodeCommunicationByQueues
protected void multiplyNodeCommunicationByQueues(Node node, List<NodeCommunication> nodeCommunications, HashSet<String> queues) -
removeOfflineNodes
-
getNodesToCommunicateWithOffline
protected List<Node> getNodesToCommunicateWithOffline(NodeCommunication.CommunicationType communicationType) -
delete
-
save
-
removeNodesWithNoBatchesToSend
protected List<NodeCommunication> removeNodesWithNoBatchesToSend(List<NodeCommunication> nodeCommunications) -
getExecutor
-
getExecutor
protected ThreadPoolExecutor getExecutor(NodeCommunication.CommunicationType communicationType, String threadChannelId) -
getAvailableThreads
- Specified by:
getAvailableThreadsin interfaceINodeCommunicationService
-
getLockTimeoutDate
-
execute
public boolean execute(NodeCommunication nodeCommunication, RemoteNodeStatuses statuses, INodeCommunicationService.INodeCommunicationExecutor executor) - Specified by:
executein interfaceINodeCommunicationService
-
lock
-
unlock
-
stop
public void stop()- Specified by:
stopin interfaceINodeCommunicationService
-
sortNodeCommunications
protected void sortNodeCommunications(List<NodeCommunication> list, NodeCommunication.CommunicationType communicationType) -
updateBatchToSendCounts
- Specified by:
updateBatchToSendCountsin interfaceINodeCommunicationService
-
parseQueueToBatchCounts
- Specified by:
parseQueueToBatchCountsin interfaceINodeCommunicationService
-