[infinispan-dev] Question on Async Eviction and Correct Cache Usage

Amin Abbaspour a.abbaspour at gmail.com
Sun Jun 14 07:43:47 EDT 2009


Hi All,

Thanks for the great product. I have just started testing infinispan
and this is my first post in the list.

Sorry if my question are vivid. (maybe this is because of docs
lacking, which I hope to be fixed and enriched asap).

1. How can I config inifispan to persis my object asynchronously and
not as soon as they are change. I have developed a JDBC cache store
for myself (which works well) but evict or persist is still sync. here
is my config:

        config.setEvictionStrategy(EvictionStrategy.FIFO);
        config.setEvictionWakeUpInterval(60 * 1000);
        config.setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);


2. I have a counter/billing like object in which in every system event
some counters are increased and some values (e.g. credit) is
decreased. This happens hundred/thousand times in a second and should
be coherent across all nodes. What is the correct policy for this
case. Should I rebuild a new object every time and replace it in the
cache with the previous one? This solution will require me to create
an object many times. Is there any other (better) solution?

3. May I have a complete sample of using transactions (including
boilerplate code) how to get transaction object. I need this for
question #2 to work correctly.

4. AFAIK distributed locks are not implemented yet. When will they be
available?

Regards,
Amin Abbaspour



More information about the infinispan-dev mailing list