It would be mainly used to prevent A from releasing a lock owned by B.
Create a simple lock yourself, inside of FLUSH
Vladimir Blagojevic wrote:
On 3/8/09 9:59 AM, Bela Ban wrote:
> I think we should turn flushInProgress into something akin to a lock,
> which additionally records its locker. So if you have a
> lock.tryAcquire(Object caller) which fails immediately if the lock is
> already locked by someone != caller.
>
> A lock.release(Object caller) fails if lock.owner != caller.
This is to prevent multiple threads in one stack invoking startFlush?
Which lock class do you recommend?
--
Bela Ban
Lead JGroups / JBoss Clustering team
JBoss - a division of Red Hat