Package org.jgroups.blocks

Examples of org.jgroups.blocks.GroupRequest.execute()


                return null;
            msg.setDest(dest);
            dests.removeAllElements();
            dests.addElement(dest);
            req=new GroupRequest(msg, corr, dests, GroupRequest.GET_FIRST, timeout_return_state, 0);
            req.execute();
            rsp_list=req.getResults();
            for(int i=0; i < rsp_list.size(); i++) {  // get the first non-suspected result
                rsp=(Rsp)rsp_list.elementAt(i);
                if(rsp.wasReceived())
                    return (byte[])rsp.getValue();
View Full Code Here


        }
        catch(Exception e) {
        }

        req=new GroupRequest(msg, corr, dests, GroupRequest.GET_ALL, timeout_return_state, 0);
        req.execute();
    }


    /**
     * Return the first element of members which is not me. Otherwise return null.
View Full Code Here

        // This marks message as sent by us ! (used in up()
        // msg.addHeader(new MsgProtHeader(getName()));   ++ already done by RequestCorrelator

        _req=new GroupRequest(msg, _corr, real_dests, mode, timeout, 0);
        try {
            _req.execute();
        }
        catch(Exception e) {
            throw new RuntimeException("failed executing request " + _req, e);
        }
View Full Code Here

        mbrs.addElement(dest);   // dummy membership (of destination address)


        _req=new GroupRequest(msg, _corr, mbrs, mode, timeout, 0);
        try {
            _req.execute();
        }
        catch(Exception e) {
            throw new RuntimeException("failed executing request " + _req, e);
        }
View Full Code Here

                return null;
            msg.setDest(dest);
            dests.removeAllElements();
            dests.addElement(dest);
            req=new GroupRequest(msg, corr, dests, GroupRequest.GET_FIRST, timeout_return_state, 0);
            req.execute();
            rsp_list=req.getResults();
            for(int i=0; i < rsp_list.size(); i++) {  // get the first non-suspected result
                rsp=(Rsp)rsp_list.elementAt(i);
                if(rsp.wasReceived())
                    return (byte[])rsp.getValue();
View Full Code Here

        }
        catch(Exception e) {
        }

        req=new GroupRequest(msg, corr, dests, GroupRequest.GET_ALL, timeout_return_state, 0);
        req.execute();
    }


    /**
     * Return the first element of members which is not me. Otherwise return null.
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.