public Object up(Event evt) { switch(evt.getType()) { case Event.SUSPECT: // it all starts here ... // todo: change to collections in 4.1 Collection<Address> s=evt.arg() instanceof Address? Collections.singletonList(evt.arg()) : evt.arg(); if(s == null) return null; s.remove(local_addr); // ignoring suspect of self if(use_icmp) s.forEach(this::verifySuspectWithICMP); else verifySuspect(s); return null; // don't pass up; we will decide later (after verification) whether to pass it up case Event.CONFIG: if(bind_addr == null) { Map<String,Object> config=evt.getArg(); bind_addr=(InetAddress)config.get("bind_addr"); } } return up_prot.up(evt); }
verifySuspect(suspected_mbr); else verifySuspectWithICMP(suspected_mbr);
public Object up(Event evt) { switch(evt.getType()) { case Event.SUSPECT: // it all starts here ... // todo: change to collections in 4.1 Collection<Address> s=evt.arg() instanceof Address? Collections.singletonList(evt.arg()) : evt.arg(); if(s == null) return null; s.remove(local_addr); // ignoring suspect of self if(!use_icmp) verifySuspect(s); else s.forEach(this::verifySuspectWithICMP); return null; // don't pass up; we will decide later (after verification) whether to pass it up case Event.CONFIG: if(bind_addr == null) { Map<String,Object> config=evt.getArg(); bind_addr=(InetAddress)config.get("bind_addr"); } } return up_prot.up(evt); }