Examples of up()


Examples of org.jgroups.stack.Protocol.up()

            for(Map.Entry<String,Protocol> entry: up_prots.entrySet()) {
                String tmp=entry.getKey();
                if(tmp.startsWith(Global.DUMMY))
                    continue;
                Protocol prot=entry.getValue();
                prot.up(new Event(Event.SET_LOCAL_ADDRESS, local_addr));
            }
        }
    }

    /* ----------------------------- End of Private Methods ---------------------------------------- */
 
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

        tp.setExpectedMessages(num_msgs); // this starts the time
        for(int i=0; i < num_msgs; i++) {
            msg=new Message(null, local_addr, buf);
            hdr=new NakAckHeader(NakAckHeader.MSG, i);
            msg.putHeader("NAKACK", hdr);
            transport.up(new Event(Event.MSG, msg));
            if(i % 10000 == 0) {
                System.out.println("passed up " + i + " messages");
            }
        }
        synchronized(tp) {
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

                Event evt=new Event(Event.MSG, msg);
                if(log.isTraceEnabled()) {
                    StringBuilder sb=new StringBuilder("message is ").append(msg).append(", headers are ").append(msg.printHeaders());
                    log.trace(sb);
                }
                tmp_prot.up(evt);
            }
            else {
                // we discard messages for a group we don't have. If we had a scenario with channel C1 and A,B on it,
                // and channel C2 and only A on it (asymmetric setup), then C2 would always log warnings that B was
                // not found (Jan 25 2008 (bela))
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

            for(Map.Entry<String,Protocol> entry: up_prots.entrySet()) {
                String tmp=entry.getKey();
                if(tmp.startsWith(Global.DUMMY))
                    continue;
                Protocol prot=entry.getValue();
                prot.up(new Event(Event.SET_LOCAL_ADDRESS, local_addr));
            }
        }
    }

    /* ----------------------------- End of Private Methods ---------------------------------------- */
 
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

            System.out.println("read " + num_msgs + " msgs from file");
            tp.setExpectedMessages(msgs.size()); // this starts the time
            for(Iterator it=msgs.iterator(); it.hasNext();) {
                msg=(Message)it.next();
                i++;
                transport.up(new Event(Event.MSG, msg));
                if(i % 10000 == 0) {
                    System.out.println("passed up " + i + " messages");
                }
            }
        }
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

                Event evt=new Event(Event.MSG, msg);
                if(log.isTraceEnabled()) {
                    StringBuilder sb=new StringBuilder("message is ").append(msg).append(", headers are ").append(msg.printHeaders());
                    log.trace(sb);
                }
                tmp_prot.up(evt);
            }
            else {
                // we discard messages for a group we don't have. If we had a scenario with channel C1 and A,B on it,
                // and channel C2 and only A on it (asymmetric setup), then C2 would always log warnings that B was
                // not found (Jan 25 2008 (bela))
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

            for(Map.Entry<String,Protocol> entry: up_prots.entrySet()) {
                String tmp=entry.getKey();
                if(tmp.startsWith(Global.DUMMY))
                    continue;
                Protocol prot=entry.getValue();
                prot.up(new Event(Event.SET_LOCAL_ADDRESS, local_addr));
            }
        }
    }

    /* ----------------------------- End of Private Methods ---------------------------------------- */
 
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

        ProtocolStack stack=c1.getProtocolStack();
        stack.removeProtocol("VERIFY_SUSPECT");
        Protocol transport=stack.getTransport();
        System.out.println(">> suspecting C2:");
        transport.up(new Event(Event.SUSPECT, c2.getLocalAddress()));

        System.out.println(">> shunning C2:");
       
        //always up EXIT on underlying JChannel as that is what happens
        //in real scenarios
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

            System.out.println("read " + num_msgs + " msgs from file");
            tp.setExpectedMessages(msgs.size()); // this starts the time
            for(Iterator it=msgs.iterator(); it.hasNext();) {
                msg=(Message)it.next();
                i++;
                transport.up(new Event(Event.MSG, msg));
                if(i % 10000 == 0) {
                    System.out.println("passed up " + i + " messages");
                }
            }
        }
View Full Code Here

Examples of org.jgroups.stack.Protocol.up()

            if(loopback && multicast && discard_own_mcast) {
                Address local=is_protocol_adapter? ((ProtocolAdapter)tmp_prot).getAddress() : local_addr;
                if(local != null && local.equals(msg.getSrc()))
                    return;
            }
            tmp_prot.up(new Event(Event.MSG, msg));
        }
    }


View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.