[infinispan-dev] CacheEntry vs. Metadata

Radim Vansa rvansa at redhat.com
Thu Mar 12 11:07:22 EDT 2015


Asking this on Friday afternoon was probably not the best time, so I'll 
try to draw some attention on Thursday :)

Radim

On 02/27/2015 03:49 PM, Radim Vansa wrote:
> Hi,
>
> I was already several times looking on the class hierarchy of CacheEntry
> and its descendants. Since the documentation of those interfaces is
> usually a one liner, I'd like to ask for the big picture:
>
> So we have CacheEntry, which implements MetadataAware - therefore, it
> contains a metadata, which define lifespan, maxIdle time and version.
> However, even the CacheEntry interface itself contains getters for
> lifespan and idle time and MortalCacheEntry hosts the fields - so I see
> that there's some duplication with the Metadata object.
> Beyond the expiration-related stuff (and common key - value getters),
> CacheEntry has several methods querying and manipulating its state -
> isChanged, isValid, isRemoved etc. It's a bit confusing that this is
> presented not as a single state but rather a matrix of boolean states.
> When I've tried to implement EntryProcessor several weeks ago (I've
> stopped the attempts since this should be implemented in Infinispan 8),
> I had quite a hard time figuring out which should be set and how in case
> I want to update/remove the entry. undelete() and skipLookup() are not
> obvious, either.
>
> Is the reason for having Immortal/Mortal/Transient/TransientMortal
> entries + Metadata* versions + *Values to optimally use memory?
>
> Then there are the ReadCommitted and RepeatableRead entries - are these
> ever stored in data container, or just in context? What's the exact
> relation between those implementing InternalCacheEntry and MVCCEntry?
>
> Then there's the DeltaAwareCacheEntry - this does not fit to the image
> for me at all.
>
> I am also not sure about the relation of EmbeddedMetadata and
> InternalMetadataImpl
>
> Thanks for your insight!
>
> Radim
>
>


-- 
Radim Vansa <rvansa at redhat.com>
JBoss Performance Team



More information about the infinispan-dev mailing list