[infinispan-dev] ConstantObjectTable

Mircea Markus mircea.markus at jboss.com
Mon Oct 11 06:58:49 EDT 2010


On 11 Oct 2010, at 11:54, 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?
Just to rock the boat :) It would be possible for the reader, if it doesn't find any mapping in the constant objects table to ask the sender which is the externalizer used. This would be an additional RPC/externalizer - no performance const really. It would complicate the code a bit though :)
>> 
>>> 
>>> 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
> 




More information about the infinispan-dev mailing list