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

void org::jgroups::protocols::CAUSAL::upViewChange ( Event  evt  )  [inline, private]

Process a VIEW_CHANGE event.

Parameters:
evt The event.

Definition at line 923 of file CAUSAL.java.

References currentView, org::jgroups::Event::getArg(), org::jgroups::View::getMembers(), org::jgroups::View::getVid(), localAddress, and org::jgroups::stack::Protocol::up().

Referenced by up().

    {
        View view=(View)evt.getArg();      
        InternalView iView=new InternalView(view.getVid(), view.getMembers(), localAddress);
        if(log.isDebugEnabled())
            log.debug("New view: "+view);
        
        synchronized(lock) {
            // Disable sending
            disable();
            
            // Create new causal view
            NewCausalView newView=new NewCausalView(currentView, iView);
            if (currentView!=null) {
                currentView.clearFinalTimeVector();
                newView.setMemberLocalTime(localAddress, currentView.getLocalTime());
            } else {
                newView.setMemberLocalTime(localAddress, 0);
            }
            
            if (log.isTraceEnabled()) log.trace("Starting synchronization thread for "+newView);
            
            newViewThread=new NewViewThread(newView);
            newViewThread.start();
        }
        
        up_prot.up(evt);
    }


Generated by  Doxygen 1.6.0   Back to index