@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARTITIONID_FIELD_NUMBER; hash = (53 * hash) + getPartitionId(); hash = (37 * hash) + ROLE_FIELD_NUMBER; hash = (53 * hash) + role_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.zeebe.gateway.protocol.GatewayOuterClass.Partition)) { return super.equals(obj); } io.zeebe.gateway.protocol.GatewayOuterClass.Partition other = (io.zeebe.gateway.protocol.GatewayOuterClass.Partition) obj; boolean result = true; result = result && (getPartitionId() == other.getPartitionId()); result = result && role_ == other.role_; result = result && unknownFields.equals(other.unknownFields); return result; }
PartitionInfoImpl(final GatewayOuterClass.Partition partition) { this.partitionId = partition.getPartitionId(); if (partition.getRole() == GatewayOuterClass.Partition.PartitionBrokerRole.LEADER) { this.role = PartitionBrokerRole.LEADER; } else if (partition.getRole() == GatewayOuterClass.Partition.PartitionBrokerRole.FOLLOWER) { this.role = PartitionBrokerRole.FOLLOWER; } else { throw new RuntimeException( String.format( "Unexpected partition broker role %s, should be one of %s", partition.getRole(), Arrays.toString(PartitionBrokerRole.values()))); } }
PartitionInfoImpl(final GatewayOuterClass.Partition partition) { this.partitionId = partition.getPartitionId(); if (partition.getRole() == GatewayOuterClass.Partition.PartitionBrokerRole.LEADER) { this.role = PartitionBrokerRole.LEADER; } else if (partition.getRole() == GatewayOuterClass.Partition.PartitionBrokerRole.FOLLOWER) { this.role = PartitionBrokerRole.FOLLOWER; } else { throw new RuntimeException( String.format( "Unexpected partition broker role %s, should be one of %s", partition.getRole(), Arrays.toString(PartitionBrokerRole.values()))); } }
public Builder mergeFrom(io.zeebe.gateway.protocol.GatewayOuterClass.Partition other) { if (other == io.zeebe.gateway.protocol.GatewayOuterClass.Partition.getDefaultInstance()) return this; if (other.getPartitionId() != 0) { setPartitionId(other.getPartitionId()); } if (other.role_ != 0) { setRoleValue(other.getRoleValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }