[infinispan-dev] ConstantObjectTable

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


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

> 
> On 11 Oct 2010, at 11:46, Galder Zamarreño wrote:
> 
>> 
>> 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)
> Makes perfect sense - thanks! 
> Is it possible for me to programatically update the ConstantObjectTable?

Not at the moment but we will soon: https://jira.jboss.org/browse/ISPN-244

If you need to add any new Externalizers for classes in other modules, see what we did for the tree module classes.

>> 
>>> 
>>> 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
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> 
> _______________________________________________
> 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