Logo Search packages:      
Sourcecode: libjgroups-java version File versions

void org::jgroups::blocks::DistributedLockManager::viewAccepted ( View  new_view  )  [inline]

Remove all locks held by members who left the previous view

Implements org::jgroups::MembershipListener.

Definition at line 636 of file DistributedLockManager.java.

References org::jgroups::View::getMembers(), preparedLocks, preparedReleases, and removeLocksHeldBy().

        Vector prev_view=new Vector(current_members);

            log.debug("-- VIEW: " + current_members + ", old view: " + prev_view);

        if(!prev_view.isEmpty()) { // we have left members, so we need to check for locks which are still held by them
            for(Iterator it=prev_view.iterator(); it.hasNext();) {
                Object mbr=it.next();
                removeLocksHeldBy(preparedLocks, mbr);
                removeLocksHeldBy(preparedReleases, mbr);
                removeLocksHeldBy(heldLocks, mbr);

Generated by  Doxygen 1.6.0   Back to index