On Aug 31, 2010, at 12:57 PM, Sanne Grinovero wrote:
2010/8/31 Mircea Markus <mircea.markus(a)jboss.com>:
>
> On 27 Aug 2010, at 19:37, Sanne Grinovero wrote:
>>
>> 3) Also my attempt to reuse some code from AbstractCacheStore though
>> inheritance is not going to make it as this implementation is doing
>> too much for the needs of AsyncStore: it cares for async Purge, and
>> all methods I wanted to commit are slightly different because of that.
>>
>> Proposal:
>> 1- Out-of-transaction modifications are pushed into a BlockingDeque
>> instead of a Map.
> do we need a deque for this? Also do we want it blocking? Perhaps we can make this
configurable and operate on an interface directly?
any kind of order-mantaining will do, I did it with an unbounded
blocking deque as that's nice to wait on for new work to appear, to
avoid starvation and provide a clean road for shutdown.
Why a deque though and not a queue? You only call put and take. No need for
removing/putting from both ends of queue, isn't it?
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache