[infinispan-dev] Feedback and requests on clustered and remote listeners

Emmanuel Bernard emmanuel at hibernate.org
Tue Sep 23 09:59:35 EDT 2014


On 23 Sep 2014, at 15:42, William Burns <mudokonman at 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(…) {
    ….
}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20140923/6834e5ac/attachment.html 


More information about the infinispan-dev mailing list