src/main/java/toy/das/bbc/BbcService.java
/**
     * Propose a value in the consensus with (cid, cidSeries).
     * @param vote the proposal
     * @param channel the proposer channel (with a single Toy group this is always 0)
     * @param cidSeries the series of this consensus instance (series changes due to an invocation of the synchronization
     *                  mechanism)
     * @param cid the id of this consensus in the given cidSeries
     * @return
     */
Propose a value in the consensus with (cid, cidSeries).
Propose a value in the consensus with ( cid cidSeries ) .
public int propose(int vote, int channel, int cidSeries, int cid) {
        Types.BbcMsg msg= Types.BbcMsg.newBuilder()
                .setM(Types.Meta.newBuilder()
                        .setChannel(channel)
                        .setCidSeries(cidSeries)
                        .setCid(cid)
                        .setSender(id)
                        .build())
                .setVote(vote)
                .build();
        byte[] data = msg.toByteArray();
        bbcProxy.invokeAsynchRequest(data, new ReplyListener() {
            @Override
            public void reset() {
            }
            @Override
            public void replyReceived(RequestContext context, TOMMessage reply) {
            }
        }, TOMMessageType.ORDERED_REQUEST);
        return 0;
    }
public int propose ( int vote , int channel , int cidSeries , int cid ) { Types . BbcMsg msg = Types . BbcMsg . newBuilder ( ) . setM ( Types . Meta . newBuilder ( ) . setChannel ( channel ) . setCidSeries ( cidSeries ) . setCid ( cid ) . setSender ( id ) . build ( ) ) . setVote ( vote ) . build ( ) ; byte [ ] data = msg . toByteArray ( ) ; bbcProxy . invokeAsynchRequest ( data , new ReplyListener ( ) { @ Override public void reset ( ) { } @ Override public void replyReceived ( RequestContext context , TOMMessage reply ) { } } , TOMMessageType . ORDERED_REQUEST ) ; return 0 ; }
Propose a value in the consensus with (cid, cidSeries).
Propose a value in the consensus with ( cid cidSeries ) .