示例#1
0
 @Override
 public RegisterResponse build() {
   super.build();
   if (response.term < 0) throw new IllegalArgumentException("term cannot be negative");
   if (response.leader < 0) throw new IllegalArgumentException("leader cannot be negative");
   return response;
 }
示例#2
0
 @Override
 Builder reset() {
   super.reset();
   response.term = 0;
   response.leader = 0;
   response.session = 0;
   response.members = null;
   return this;
 }