public static Message buildProposal ( Transaction txn ) { ZabMessage . Zxid zxid = toProtoZxid ( txn . getZxid ( ) ) ; Proposal prop = Proposal . newBuilder ( ) . setZxid ( zxid ) . setBody ( ByteString . copyFrom ( txn . getBody ( ) ) ) . setType ( ProposalType . values ( ) [ txn . getType ( ) ] ) . build ( ) ; return Message . newBuilder ( ) . setType ( MessageType . PROPOSAL ) . setProposal ( prop ) . build ( ) ; }
Creates a PROPOSAL message .