On Tue, Sep 23, 2014 at 12:12 PM, Galder Zamarreño <galder(a)redhat.com> wrote:
On 22 Sep 2014, at 19:23, William Burns <mudokonman(a)gmail.com> wrote:
> On Fri, Sep 19, 2014 at 12:39 PM, Emmanuel Bernard
> <emmanuel(a)hibernate.org> wrote:
>>
>> On 19 Sep 2014, at 17:09, William Burns <mudokonman(a)gmail.com> wrote:
>>
>>> </snip>
>
>> At any rate the programming model becomes quite awkward and rely on strong
understanding, I’d prefer to stick an enum showing the transition explicitly to make
things easier.
>
> I am not sold on this as it seems pretty trivial to decipher which
> operation is which and the information would be present on the
> javadocs as well.
I’m with Emmanuel on this. I’d much rather avoid relying on whether something is
null/not-null and instead rely on a more typesafe solution. In fact, for remote listeners,
org.infinispan.client.hotrod.event.ClientEvent has a type that allows the client to detect
the type of the event received, independent of what the value(s) contain.
Yeah I think the idea I was going down was to do a hybrid approach
where we have the single method (containing the enum type) and then
provide an abstract class that does the method separation if an
implementer wants some boilerplate code implemented already.
Cheers,
--
Galder Zamarreño
galder(a)redhat.com
twitter.com/galderz
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev