[infinispan-dev] ConstantObjectTable

Galder Zamarreño galder at redhat.com
Mon Oct 11 06:46:52 EDT 2010


On Oct 11, 2010, at 12:37 PM, Mircea Markus wrote:

> Hi,
> 
> I remember we had this discussion at one point, sorry if I am repeating it.
> ConstantObjectTable has all the externalizer's statically defined within it. Can it just read them on the fly from the annotations existing on the object it needs to serialize? I.e. if e.g. TransientMortalCacheEntry is annotated as @Marshallable  why is it needed to add it to the ConstantObjectTable again?

There primary reason is: How is a node that hasn't serialized TransientMortalCacheEntry gonna know that what comes through the wire is a TransientMortalCacheEntry? It needs to know for a given ID, which externalizer to use to read. So, we either, did this statically or via annotation scanning of classpath. The latter is no no, so we went for static. Once we saw we needed static definition, we decided to do it both ways, for given a Class, give me the Externalizer (writing) and for a given ID, give me the Externalizer (reading)

> 
> Cheers,
> Mircea
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list