On 23 Sep 2014, at 15:42, William Burns <mudokonman(a)gmail.com> wrote:
Reread the other email again and actually it could be used to show
different permutations like the retry case (eq RETRIED_CREATE), but it
seems like the code in that one method would get pretty complex pretty
fast having to handle all the various cases.
If the combiname becomes complicated for a specific complex filter, nothing prevents the
implementor to split it into different methods
public boolean filter(Key key, Value old, Value new, EventType eventType, Metadata
metadata) {
switch(eventType) {
case CREATE:
return filterForCreate(…);
break;
….
default:
throw new AssertionFailure(“oops: “ + eventType);
}
}
private boolean filterForCreate(…) {
….
}