public class NodeCommunicationService extends AbstractService implements INodeCommunicationService
INodeCommunicationService.INodeCommunicationExecutorlog, parameterService, platform, sqlTemplate, sqlTemplateDirty, symmetricDialect, tablePrefix| Constructor and Description |
|---|
NodeCommunicationService(IClusterService clusterService,
INodeService nodeService,
IParameterService parameterService,
IConfigurationService configurationService,
ISymmetricDialect symmetricDialect) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(NodeCommunication nodeCommunication) |
boolean |
execute(NodeCommunication nodeCommunication,
RemoteNodeStatuses statuses,
INodeCommunicationService.INodeCommunicationExecutor executor) |
protected java.util.List<NodeCommunication> |
filterForChannelThreading(java.util.List<Node> nodesToCommunicateWith) |
protected java.util.List<NodeCommunication> |
find(NodeCommunication.CommunicationType communicationType) |
NodeCommunication |
find(java.lang.String nodeId,
java.lang.String queue,
NodeCommunication.CommunicationType communicationType) |
int |
getAvailableThreads(NodeCommunication.CommunicationType communicationType) |
protected java.util.concurrent.ThreadPoolExecutor |
getExecutor(NodeCommunication.CommunicationType communicationType) |
protected java.util.concurrent.ThreadPoolExecutor |
getExecutor(NodeCommunication.CommunicationType communicationType,
java.lang.String threadChannelId) |
protected java.util.Date |
getLockTimeoutDate(NodeCommunication.CommunicationType communicationType) |
protected java.util.List<java.lang.String> |
getNodeIdsWithUnsentCount() |
protected java.util.List<Node> |
getNodesToCommunicateWithOffline(NodeCommunication.CommunicationType communicationType) |
java.util.List<NodeCommunication> |
list(NodeCommunication.CommunicationType communicationType) |
protected boolean |
lock(NodeCommunication nodeCommunication,
java.util.Date lockTime) |
java.util.Map<java.lang.String,java.lang.Integer> |
parseQueueToBatchCounts(java.lang.String channelToBatchCountsString) |
void |
persistToTableForSnapshot() |
protected java.util.List<NodeCommunication> |
removeNodesWithNoBatchesToSend(java.util.List<NodeCommunication> nodeCommunications) |
protected java.util.List<Node> |
removeOfflineNodes(java.util.List<Node> nodes) |
protected void |
save(NodeCommunication nodeCommunication,
boolean force) |
protected void |
sortNodeCommunications(java.util.List<NodeCommunication> list,
NodeCommunication.CommunicationType communicationType) |
void |
stop() |
protected void |
unlock(NodeCommunication nodeCommunication,
boolean failed,
long ts) |
void |
updateBatchToSendCounts(java.lang.String nodeId,
java.util.Map<java.lang.String,java.lang.Integer> batchesCountToQueues) |
assertNotNull, buildBatchWhere, close, createSqlReplacementTokens, createSqlReplacementTokens, getJdbcTemplate, getParameterService, getSql, getSymmetricDialect, getTablePrefix, getTargetDialect, getTargetPlatform, getTargetPlatform, isCalledFromSymmetricAdminTool, isSet, isStreamClosedByClient, isSymmetricTable, logOnce, maxDate, readAcks, sendAck, setSqlMap, synchronize, toNodeIds, toNodeIdspublic NodeCommunicationService(IClusterService clusterService, INodeService nodeService, IParameterService parameterService, IConfigurationService configurationService, ISymmetricDialect symmetricDialect)
public void persistToTableForSnapshot()
persistToTableForSnapshot in interface INodeCommunicationServicepublic NodeCommunication find(java.lang.String nodeId, java.lang.String queue, NodeCommunication.CommunicationType communicationType)
find in interface INodeCommunicationServiceprotected java.util.List<NodeCommunication> find(NodeCommunication.CommunicationType communicationType)
public java.util.List<NodeCommunication> list(NodeCommunication.CommunicationType communicationType)
list in interface INodeCommunicationServiceprotected java.util.List<java.lang.String> getNodeIdsWithUnsentCount()
protected java.util.List<NodeCommunication> filterForChannelThreading(java.util.List<Node> nodesToCommunicateWith)
protected java.util.List<Node> getNodesToCommunicateWithOffline(NodeCommunication.CommunicationType communicationType)
public boolean delete(NodeCommunication nodeCommunication)
protected void save(NodeCommunication nodeCommunication, boolean force)
protected java.util.List<NodeCommunication> removeNodesWithNoBatchesToSend(java.util.List<NodeCommunication> nodeCommunications)
protected java.util.concurrent.ThreadPoolExecutor getExecutor(NodeCommunication.CommunicationType communicationType)
protected java.util.concurrent.ThreadPoolExecutor getExecutor(NodeCommunication.CommunicationType communicationType, java.lang.String threadChannelId)
public int getAvailableThreads(NodeCommunication.CommunicationType communicationType)
getAvailableThreads in interface INodeCommunicationServiceprotected java.util.Date getLockTimeoutDate(NodeCommunication.CommunicationType communicationType)
public boolean execute(NodeCommunication nodeCommunication, RemoteNodeStatuses statuses, INodeCommunicationService.INodeCommunicationExecutor executor)
execute in interface INodeCommunicationServiceprotected boolean lock(NodeCommunication nodeCommunication, java.util.Date lockTime)
protected void unlock(NodeCommunication nodeCommunication, boolean failed, long ts)
public void stop()
stop in interface INodeCommunicationServiceprotected void sortNodeCommunications(java.util.List<NodeCommunication> list, NodeCommunication.CommunicationType communicationType)
public void updateBatchToSendCounts(java.lang.String nodeId,
java.util.Map<java.lang.String,java.lang.Integer> batchesCountToQueues)
updateBatchToSendCounts in interface INodeCommunicationServicepublic java.util.Map<java.lang.String,java.lang.Integer> parseQueueToBatchCounts(java.lang.String channelToBatchCountsString)
parseQueueToBatchCounts in interface INodeCommunicationService