@Override public int hashCode() { return Objects.hash(partitionId(), members(), primary(), backups()); }
/** * Returns the partition ID. * * @return the partition ID */ public PartitionId partitionId() { return subject(); }
@Override public boolean equals(Object object) { if (object instanceof PartitionEvent) { PartitionEvent that = (PartitionEvent) object; return this.partitionId().equals(that.partitionId()) && this.members.equals(that.members) && Objects.equals(this.primary, that.primary) && this.backups.equals(that.backups); } return false; }