public static Message buildProposedEpoch ( long proposedEpoch , long acknowledgedEpoch , ClusterConfiguration config , int syncTimeoutMs ) { ZabMessage . Zxid version = toProtoZxid ( config . getVersion ( ) ) ; ZabMessage . ClusterConfiguration zCnf = ZabMessage . ClusterConfiguration . newBuilder ( ) . setVersion ( version ) . addAllServers ( config . getPeers ( ) ) . build ( ) ; ProposedEpoch pEpoch = ProposedEpoch . newBuilder ( ) . setProposedEpoch ( proposedEpoch ) . setCurrentEpoch ( acknowledgedEpoch ) . setConfig ( zCnf ) . setSyncTimeout ( syncTimeoutMs ) . build ( ) ; return Message . newBuilder ( ) . setType ( MessageType . PROPOSED_EPOCH ) . setProposedEpoch ( pEpoch ) . build ( ) ; }
Creates CEPOCH message .