|
4 | 4 | import java.util.ArrayList;
|
5 | 5 | import java.util.List;
|
6 | 6 | import java.util.Map;
|
| 7 | +import java.util.Objects; |
7 | 8 |
|
8 | 9 | import javax.annotation.Nonnull;
|
9 | 10 | import javax.annotation.Nullable;
|
@@ -179,4 +180,40 @@ public TopicDescription build() {
|
179 | 180 | return new TopicDescription(this);
|
180 | 181 | }
|
181 | 182 | }
|
| 183 | + |
| 184 | + @Override |
| 185 | + public boolean equals(Object o) { |
| 186 | + if (o == null || getClass() != o.getClass()) { |
| 187 | + return false; |
| 188 | + } |
| 189 | + TopicDescription that = (TopicDescription) o; |
| 190 | + return retentionStorageMb == that.retentionStorageMb && |
| 191 | + partitionWriteSpeedBytesPerSecond == that.partitionWriteSpeedBytesPerSecond && |
| 192 | + partitionWriteBurstBytes == that.partitionWriteBurstBytes && |
| 193 | + Objects.equals(partitioningSettings, that.partitioningSettings) && |
| 194 | + Objects.equals(partitions, that.partitions) && |
| 195 | + Objects.equals(retentionPeriod, that.retentionPeriod) && |
| 196 | + Objects.equals(supportedCodecs, that.supportedCodecs) && |
| 197 | + Objects.equals(attributes, that.attributes) && |
| 198 | + Objects.equals(consumers, that.consumers) && |
| 199 | + meteringMode == that.meteringMode && |
| 200 | + Objects.equals(topicStats, that.topicStats); |
| 201 | + } |
| 202 | + |
| 203 | + @Override |
| 204 | + public int hashCode() { |
| 205 | + return Objects.hash( |
| 206 | + partitioningSettings, |
| 207 | + partitions, |
| 208 | + retentionPeriod, |
| 209 | + retentionStorageMb, |
| 210 | + supportedCodecs, |
| 211 | + partitionWriteSpeedBytesPerSecond, |
| 212 | + partitionWriteBurstBytes, |
| 213 | + attributes, |
| 214 | + consumers, |
| 215 | + meteringMode, |
| 216 | + topicStats |
| 217 | + ); |
| 218 | + } |
182 | 219 | }
|
0 commit comments