public class OutgoingBatchService extends AbstractService implements IOutgoingBatchService
IOutgoingBatchServicelog, parameterService, platform, sqlTemplate, sqlTemplateDirty, symmetricDialect, tablePrefix| Constructor and Description |
|---|
OutgoingBatchService(IParameterService parameterService,
ISymmetricDialect symmetricDialect,
INodeService nodeService,
IConfigurationService configurationService,
ISequenceService sequenceService,
IClusterService clusterService,
IExtensionService extensionService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areAllLoadBatchesComplete(java.lang.String nodeId) |
protected java.lang.StringBuilder |
buildStatusList(java.lang.Object[] args,
AbstractBatch.Status... statuses) |
int |
cancelLoadBatches(long loadId) |
protected boolean |
containsOnlyStatus(AbstractBatch.Status status,
java.util.List<AbstractBatch.Status> statuses) |
void |
copyOutgoingBatches(java.lang.String channelId,
long startBatchId,
java.lang.String fromNodeId,
java.lang.String toNodeId) |
int |
countOutgoingBatches(java.util.List<java.lang.String> nodeIds,
java.util.List<java.lang.String> channels,
java.util.List<AbstractBatch.Status> statuses,
java.util.List<java.lang.Long> loads) |
int |
countOutgoingBatchesInError() |
int |
countOutgoingBatchesInError(java.lang.String channelId) |
java.util.Map<java.lang.String,java.lang.Integer> |
countOutgoingBatchesPendingByChannel(java.lang.String nodeId) |
int |
countOutgoingBatchesUnsent() |
int |
countOutgoingBatchesUnsent(java.lang.String channelId) |
int |
countOutgoingBatchesUnsentHeartbeat() |
int |
countUnsentBatchesByTargetNode(java.lang.String nodeId) |
long |
countUnsentRowsByTargetNode(java.lang.String nodeId) |
OutgoingBatch |
findOutgoingBatch(long batchId,
java.lang.String nodeId) |
java.util.List<OutgoingBatchSummary> |
findOutgoingBatchSummary(AbstractBatch.Status... statuses) |
java.util.List<OutgoingBatchSummary> |
findOutgoingBatchSummaryByChannel(AbstractBatch.Status... statuses) |
java.util.List<OutgoingBatchSummary> |
findOutgoingBatchSummaryByNode(java.lang.String nodeId,
java.util.Date sinceCreateTime,
AbstractBatch.Status... statuses) |
java.util.List<java.lang.Long> |
getAllBatches() |
java.util.List<OutgoingBatch> |
getBatchesForChannelWindows(OutgoingBatches batches,
java.lang.String targetNodeId,
NodeChannel channel,
java.util.List<NodeGroupChannelWindow> windows) |
java.util.List<OutgoingBatch> |
getNextOutgoingBatchForEachNode() |
java.util.List<java.lang.String> |
getNodesInError() |
OutgoingBatches |
getOutgoingBatchByLoad(long loadId) |
OutgoingBatches |
getOutgoingBatchByLoadRangeAndTable(long loadId,
long startBatchId,
long endBatchId,
java.lang.String tableName) |
OutgoingBatches |
getOutgoingBatchErrors(int maxRows) |
OutgoingBatches |
getOutgoingBatches(java.lang.String nodeId,
boolean includeDisabledChannels)
Select batches to process.
|
OutgoingBatches |
getOutgoingBatches(java.lang.String nodeId,
java.lang.String channelThread,
boolean includeDisabledChannels) |
OutgoingBatches |
getOutgoingBatches(java.lang.String nodeId,
java.lang.String channelThread,
NodeGroupLinkAction eventAction,
NodeGroupLinkAction defaultEventAction,
boolean includeDisabledChannels) |
OutgoingBatches |
getOutgoingBatchRange(long startBatchId,
long endBatchId) |
OutgoingBatches |
getOutgoingBatchRange(java.lang.String nodeId,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String... channels) |
void |
insertOutgoingBatch(org.jumpmind.db.sql.ISqlTransaction transaction,
OutgoingBatch outgoingBatch) |
void |
insertOutgoingBatch(OutgoingBatch outgoingBatch) |
void |
insertOutgoingBatches(org.jumpmind.db.sql.ISqlTransaction transaction,
java.util.List<OutgoingBatch> batches,
int flushSize,
boolean isCommon) |
boolean |
inTimeWindow(java.util.List<NodeGroupChannelWindow> windows,
java.lang.String targetNodeId)
If
NodeGroupChannelWindows are defined for this channel, then
check to see if the time (according to the offset passed in) is within on
of the configured windows. |
boolean |
isInitialLoadComplete(java.lang.String nodeId) |
boolean |
isUnsentDataOnChannelForNode(java.lang.String channelId,
java.lang.String nodeId) |
java.util.List<OutgoingBatch> |
listOutgoingBatches(java.util.List<java.lang.String> nodeIds,
java.util.List<java.lang.String> channels,
java.util.List<AbstractBatch.Status> statuses,
java.util.List<java.lang.Long> loads,
long startAtBatchId,
int maxRowsToRetrieve,
boolean ascending) |
void |
markAllAsSentForNode(java.lang.String nodeId,
boolean includeConfigChannel) |
void |
markAllConfigAsSentForNode(java.lang.String nodeId) |
protected java.util.List<java.lang.String> |
toStringList(java.util.List<AbstractBatch.Status> statuses) |
void |
updateAbandonedRoutingBatches() |
void |
updateCommonBatchExtractStatistics(OutgoingBatch outgoingBatch) |
void |
updateOutgoingBatch(org.jumpmind.db.sql.ISqlTransaction transaction,
OutgoingBatch outgoingBatch) |
void |
updateOutgoingBatch(OutgoingBatch outgoingBatch) |
void |
updateOutgoingBatches(org.jumpmind.db.sql.ISqlTransaction transaction,
java.util.List<OutgoingBatch> batches,
int flushSize) |
void |
updateOutgoingBatches(java.util.List<OutgoingBatch> outgoingBatches) |
void |
updateOutgoingBatchStatus(org.jumpmind.db.sql.ISqlTransaction transaction,
AbstractBatch.Status status,
java.lang.String nodeId,
long startBatchId,
long endBatchId) |
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 OutgoingBatchService(IParameterService parameterService, ISymmetricDialect symmetricDialect, INodeService nodeService, IConfigurationService configurationService, ISequenceService sequenceService, IClusterService clusterService, IExtensionService extensionService)
public int cancelLoadBatches(long loadId)
cancelLoadBatches in interface IOutgoingBatchServicepublic void markAllAsSentForNode(java.lang.String nodeId,
boolean includeConfigChannel)
markAllAsSentForNode in interface IOutgoingBatchServicepublic void markAllConfigAsSentForNode(java.lang.String nodeId)
markAllConfigAsSentForNode in interface IOutgoingBatchServicepublic void copyOutgoingBatches(java.lang.String channelId,
long startBatchId,
java.lang.String fromNodeId,
java.lang.String toNodeId)
copyOutgoingBatches in interface IOutgoingBatchServicepublic void updateAbandonedRoutingBatches()
updateAbandonedRoutingBatches in interface IOutgoingBatchServicepublic void updateOutgoingBatches(java.util.List<OutgoingBatch> outgoingBatches)
updateOutgoingBatches in interface IOutgoingBatchServicepublic void updateOutgoingBatch(OutgoingBatch outgoingBatch)
updateOutgoingBatch in interface IOutgoingBatchServicepublic void updateCommonBatchExtractStatistics(OutgoingBatch outgoingBatch)
updateCommonBatchExtractStatistics in interface IOutgoingBatchServicepublic void updateOutgoingBatch(org.jumpmind.db.sql.ISqlTransaction transaction,
OutgoingBatch outgoingBatch)
updateOutgoingBatch in interface IOutgoingBatchServicepublic void updateOutgoingBatches(org.jumpmind.db.sql.ISqlTransaction transaction,
java.util.List<OutgoingBatch> batches,
int flushSize)
updateOutgoingBatches in interface IOutgoingBatchServicepublic void updateOutgoingBatchStatus(org.jumpmind.db.sql.ISqlTransaction transaction,
AbstractBatch.Status status,
java.lang.String nodeId,
long startBatchId,
long endBatchId)
updateOutgoingBatchStatus in interface IOutgoingBatchServicepublic void insertOutgoingBatch(OutgoingBatch outgoingBatch)
insertOutgoingBatch in interface IOutgoingBatchServicepublic void insertOutgoingBatch(org.jumpmind.db.sql.ISqlTransaction transaction,
OutgoingBatch outgoingBatch)
insertOutgoingBatch in interface IOutgoingBatchServicepublic void insertOutgoingBatches(org.jumpmind.db.sql.ISqlTransaction transaction,
java.util.List<OutgoingBatch> batches,
int flushSize,
boolean isCommon)
insertOutgoingBatches in interface IOutgoingBatchServicepublic OutgoingBatch findOutgoingBatch(long batchId, java.lang.String nodeId)
findOutgoingBatch in interface IOutgoingBatchServicepublic int countOutgoingBatchesInError()
countOutgoingBatchesInError in interface IOutgoingBatchServicepublic int countOutgoingBatchesInError(java.lang.String channelId)
countOutgoingBatchesInError in interface IOutgoingBatchServicepublic int countOutgoingBatchesUnsent()
countOutgoingBatchesUnsent in interface IOutgoingBatchServicepublic int countOutgoingBatchesUnsent(java.lang.String channelId)
countOutgoingBatchesUnsent in interface IOutgoingBatchServicepublic int countOutgoingBatchesUnsentHeartbeat()
countOutgoingBatchesUnsentHeartbeat in interface IOutgoingBatchServicepublic java.util.Map<java.lang.String,java.lang.Integer> countOutgoingBatchesPendingByChannel(java.lang.String nodeId)
countOutgoingBatchesPendingByChannel in interface IOutgoingBatchServicepublic int countUnsentBatchesByTargetNode(java.lang.String nodeId)
countUnsentBatchesByTargetNode in interface IOutgoingBatchServicepublic long countUnsentRowsByTargetNode(java.lang.String nodeId)
countUnsentRowsByTargetNode in interface IOutgoingBatchServicepublic int countOutgoingBatches(java.util.List<java.lang.String> nodeIds,
java.util.List<java.lang.String> channels,
java.util.List<AbstractBatch.Status> statuses,
java.util.List<java.lang.Long> loads)
countOutgoingBatches in interface IOutgoingBatchServicepublic java.util.List<OutgoingBatch> listOutgoingBatches(java.util.List<java.lang.String> nodeIds, java.util.List<java.lang.String> channels, java.util.List<AbstractBatch.Status> statuses, java.util.List<java.lang.Long> loads, long startAtBatchId, int maxRowsToRetrieve, boolean ascending)
listOutgoingBatches in interface IOutgoingBatchServiceprotected java.util.List<java.lang.String> toStringList(java.util.List<AbstractBatch.Status> statuses)
protected boolean containsOnlyStatus(AbstractBatch.Status status, java.util.List<AbstractBatch.Status> statuses)
public OutgoingBatches getOutgoingBatches(java.lang.String nodeId, boolean includeDisabledChannels)
#buildOutgoingBatches(String) in channel priority
order.getOutgoingBatches in interface IOutgoingBatchServicepublic OutgoingBatches getOutgoingBatches(java.lang.String nodeId, java.lang.String channelThread, boolean includeDisabledChannels)
getOutgoingBatches in interface IOutgoingBatchServicepublic OutgoingBatches getOutgoingBatches(java.lang.String nodeId, java.lang.String channelThread, NodeGroupLinkAction eventAction, NodeGroupLinkAction defaultEventAction, boolean includeDisabledChannels)
getOutgoingBatches in interface IOutgoingBatchServicepublic java.util.List<OutgoingBatch> getBatchesForChannelWindows(OutgoingBatches batches, java.lang.String targetNodeId, NodeChannel channel, java.util.List<NodeGroupChannelWindow> windows)
public boolean inTimeWindow(java.util.List<NodeGroupChannelWindow> windows, java.lang.String targetNodeId)
NodeGroupChannelWindows are defined for this channel, then
check to see if the time (according to the offset passed in) is within on
of the configured windows.public OutgoingBatches getOutgoingBatchRange(java.lang.String nodeId, java.util.Date startDate, java.util.Date endDate, java.lang.String... channels)
getOutgoingBatchRange in interface IOutgoingBatchServicepublic OutgoingBatches getOutgoingBatchRange(long startBatchId, long endBatchId)
getOutgoingBatchRange in interface IOutgoingBatchServicepublic OutgoingBatches getOutgoingBatchByLoad(long loadId)
getOutgoingBatchByLoad in interface IOutgoingBatchServicepublic OutgoingBatches getOutgoingBatchByLoadRangeAndTable(long loadId, long startBatchId, long endBatchId, java.lang.String tableName)
getOutgoingBatchByLoadRangeAndTable in interface IOutgoingBatchServicepublic OutgoingBatches getOutgoingBatchErrors(int maxRows)
getOutgoingBatchErrors in interface IOutgoingBatchServicepublic java.util.List<java.lang.String> getNodesInError()
getNodesInError in interface IOutgoingBatchServicepublic java.util.List<OutgoingBatch> getNextOutgoingBatchForEachNode()
public boolean isInitialLoadComplete(java.lang.String nodeId)
isInitialLoadComplete in interface IOutgoingBatchServicepublic boolean areAllLoadBatchesComplete(java.lang.String nodeId)
areAllLoadBatchesComplete in interface IOutgoingBatchServicepublic boolean isUnsentDataOnChannelForNode(java.lang.String channelId,
java.lang.String nodeId)
isUnsentDataOnChannelForNode in interface IOutgoingBatchServiceprotected java.lang.StringBuilder buildStatusList(java.lang.Object[] args,
AbstractBatch.Status... statuses)
public java.util.List<OutgoingBatchSummary> findOutgoingBatchSummaryByNode(java.lang.String nodeId, java.util.Date sinceCreateTime, AbstractBatch.Status... statuses)
findOutgoingBatchSummaryByNode in interface IOutgoingBatchServicepublic java.util.List<OutgoingBatchSummary> findOutgoingBatchSummary(AbstractBatch.Status... statuses)
findOutgoingBatchSummary in interface IOutgoingBatchServicepublic java.util.List<OutgoingBatchSummary> findOutgoingBatchSummaryByChannel(AbstractBatch.Status... statuses)
findOutgoingBatchSummaryByChannel in interface IOutgoingBatchServicepublic java.util.List<java.lang.Long> getAllBatches()
getAllBatches in interface IOutgoingBatchService