Package org.jgroups.stack

Examples of org.jgroups.stack.StaticInterval


    Retransmitter xmitter;

    protected void setUp() throws Exception {
        super.setUp();
        xmitter=new Retransmitter(sender, new MyXmitter());
        xmitter.setRetransmitTimeouts(new StaticInterval(1000,2000,4000,8000));
    }
View Full Code Here


        _win.stop();
    } // testAck()


    public void testRemove() throws UnknownHostException {
        AckMcastSenderWindow mywin=new AckMcastSenderWindow(new MyCommand(), new StaticInterval(1000, 2000, 3000));
        Address sender1=new IpAddress("127.0.0.1", 10000);
        Address sender2=new IpAddress("127.0.0.1", 10001);
        Address sender3=new IpAddress("127.0.0.1", 10002);
        Vector senders=new Vector();
        Message msg=new Message();
View Full Code Here

        final Lock              lock=new ReentrantLock();

        public SenderEntry(long send_conn_id, AckSenderWindow.RetransmitCommand cmd, long[] timeout,
                           TimeScheduler timer, Address local_addr) {
            this.send_conn_id=send_conn_id;
            sent_msgs=new AckSenderWindow(cmd, new StaticInterval(timeout), timer, local_addr);
        }
View Full Code Here

                sender_win.stop();
                break;

            case Event.CONNECT:
                Object ret=down_prot.down(evt);
                sender_win=new AckMcastSenderWindow(this, new StaticInterval(timeout));

                // send join announcement
                Message join_msg=new Message();
                join_msg.putHeader(this.id, new SmackHeader(SmackHeader.JOIN_ANNOUNCEMENT, -1));
                down_prot.down(new Event(Event.MSG, join_msg));
View Full Code Here

        final Lock              lock=new ReentrantLock();

        public SenderEntry(short send_conn_id, AckSenderWindow.RetransmitCommand cmd, long[] timeout,
                           TimeScheduler timer, Address local_addr) {
            this.send_conn_id=send_conn_id;
            sent_msgs=new AckSenderWindow(cmd, new StaticInterval(timeout), timer, local_addr);
        }
View Full Code Here

        final Lock              lock=new ReentrantLock();

        public SenderEntry(long send_conn_id, AckSenderWindow.RetransmitCommand cmd, long[] timeout,
                           TimeScheduler timer, Address local_addr) {
            this.send_conn_id=send_conn_id;
            sent_msgs=new AckSenderWindow(cmd, new StaticInterval(timeout), timer, local_addr);
        }
View Full Code Here

                    try {
                        seqno=entry.sent_msgs_seqno;
                        if(seqno == DEFAULT_FIRST_SEQNO) // only happens on the first message
                            entry.send_conn_id=send_conn_id=getNewConnectionId();
                        if(entry.sent_msgs == null) // first msg to peer 'dst'
                            entry.sent_msgs=new AckSenderWindow(this, new StaticInterval(timeout), timer, this.local_addr);
                        hdr=new UnicastHeader(UnicastHeader.DATA, seqno, entry.send_conn_id, seqno == DEFAULT_FIRST_SEQNO);
                        msg.putHeader(getName(), hdr);
                        entry.sent_msgs.add(seqno, msg)// add *including* UnicastHeader, adds to retransmitter
                        entry.sent_msgs_seqno++;
                    }
View Full Code Here

                sender_win.stop();
                break;

            case Event.CONNECT:
                Object ret=down_prot.down(evt);
                sender_win=new AckMcastSenderWindow(this, new StaticInterval(timeout));

                // send join announcement
                Message join_msg=new Message();
                join_msg.putHeader(name, new SmackHeader(SmackHeader.JOIN_ANNOUNCEMENT, -1));
                down_prot.down(new Event(Event.MSG, join_msg));
View Full Code Here

                    try {
                        seqno=entry.sent_msgs_seqno;
                        if(seqno == DEFAULT_FIRST_SEQNO) // only happens on the first message
                            entry.send_conn_id=getNewConnectionId();
                        if(entry.sent_msgs == null) // first msg to peer 'dst'
                            entry.sent_msgs=new AckSenderWindow(this, new StaticInterval(timeout), timer, this.local_addr);
                        UnicastHeader hdr=new UnicastHeader(UnicastHeader.DATA, seqno, entry.send_conn_id,
                                                            seqno == DEFAULT_FIRST_SEQNO);
                        msg.putHeader(name, hdr);
                        if(log.isTraceEnabled()) {
                            StringBuilder sb=new StringBuilder();
View Full Code Here

        final Lock              lock=new ReentrantLock();

        public SenderEntry(long send_conn_id, AckSenderWindow.RetransmitCommand cmd, long[] timeout,
                           TimeScheduler timer, Address local_addr) {
            this.send_conn_id=send_conn_id;
            sent_msgs=new AckSenderWindow(cmd, new StaticInterval(timeout), timer, local_addr);
        }
View Full Code Here

TOP

Related Classes of org.jgroups.stack.StaticInterval

Copyright © 2018 www.massapicom. 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.