Skip to content

Commit

Permalink
Changed the interface name for IBatchAlgorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Jul 18, 2009
1 parent 8f88ec4 commit 746197e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Expand Up @@ -25,7 +25,7 @@

public class DefaultBatchAlgorithm implements IBatchAlgorithm {

public boolean completeBatch(OutgoingBatchHistory history, OutgoingBatch batch, DataMetaData dataMetaData,
public boolean isBatchComplete(OutgoingBatchHistory history, OutgoingBatch batch, DataMetaData dataMetaData,
IRoutingContext routingContext) {
return history.getDataEventCount() >= dataMetaData.getChannel().getMaxBatchSize()
&& routingContext.isEncountedTransactionBoundary();
Expand Down
Expand Up @@ -32,6 +32,6 @@
* @since 2.0
*/
public interface IBatchAlgorithm extends IExtensionPoint {
public boolean completeBatch(OutgoingBatchHistory history, OutgoingBatch batch, DataMetaData dataMetaData,
public boolean isBatchComplete(OutgoingBatchHistory history, OutgoingBatch batch, DataMetaData dataMetaData,
IRoutingContext routingContext);
}
Expand Up @@ -25,7 +25,7 @@

public class TransactionalBatchAlgorithm implements IBatchAlgorithm {

public boolean completeBatch(OutgoingBatchHistory history, OutgoingBatch batch, DataMetaData dataMetaData,
public boolean isBatchComplete(OutgoingBatchHistory history, OutgoingBatch batch, DataMetaData dataMetaData,
IRoutingContext routingContext) {
return routingContext.isEncountedTransactionBoundary();
}
Expand Down
Expand Up @@ -264,7 +264,7 @@ protected void insertDataEvents(IRoutingContext routingContext, DataMetaData dat
routingContext.setRouted(true);
dataService.insertDataEvent(routingContext.getJdbcTemplate(), dataMetaData.getData().getDataId(),
nodeId, batch.getBatchId());
if (batchAlgorithms.get(routingContext.getChannel().getBatchAlgorithm()).completeBatch(history,
if (batchAlgorithms.get(routingContext.getChannel().getBatchAlgorithm()).isBatchComplete(history,
batch, dataMetaData, routingContext)) {
// TODO Add route_time_ms to history. Also fix outgoing batch so we don't end up
// with so many history records
Expand Down

0 comments on commit 746197e

Please sign in to comment.