Skip to content

Commit

Permalink
move completeBatch to the abstract level cuz it is not always needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Aug 12, 2009
1 parent 6c09b8a commit c36c92a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
Expand Up @@ -125,4 +125,9 @@ protected Set<String> toNodeIds(Set<Node> nodes) {
return nodeIds;
}

/**
* Override if needed.
*/
public void completeBatch(IRouterContext context) {
}
}
Expand Up @@ -20,9 +20,6 @@ public class BshDataRouter extends AbstractDataRouter {

protected IDbDialect dbDialect;

public void completeBatch(IRouterContext context) {
}

public Collection<String> routeToNodes(IRouterContext context, DataMetaData dataMetaData, Set<Node> nodes,
boolean initialLoad) {
try {
Expand All @@ -31,9 +28,9 @@ public Collection<String> routeToNodes(IRouterContext context, DataMetaData data
Object value = interpreter.eval(dataMetaData.getTrigger().getRouterExpression());
return eval(value, nodes);
} catch (EvalError e) {
logger.error(e, e);
logger.error("Error in data router. Routing to nobody.", e);
return Collections.emptySet();
}
return Collections.emptySet();
}

protected Collection<String> eval(Object value, Set<Node> nodes) {
Expand Down
Expand Up @@ -108,10 +108,6 @@ public Collection<String> routeToNodes(IRouterContext routingContext, DataMetaDa
return nodeIds;

}

public void completeBatch(IRouterContext context) {

}

public void setRegistrationService(IRegistrationService registrationService) {
this.registrationService = registrationService;
Expand Down
Expand Up @@ -58,10 +58,6 @@ public Collection<String> routeToNodes(IRouterContext routingContext, DataMetaDa
return nodeIds;
}

public void completeBatch(IRouterContext context) {

}

public void setSql(String sql) {
this.sql = sql;
}
Expand Down

0 comments on commit c36c92a

Please sign in to comment.