Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,23 @@ public int compareTo(TraceContext o) {
return Long.compare(this.timeStamp, o.getTimeStamp());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof TraceContext)) {
return false;
}
TraceContext that = (TraceContext) o;
return this.timeStamp == that.timeStamp;
}

@Override
public int hashCode() {
return Long.hashCode(timeStamp);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder(1024);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,23 @@ public int compareTo(ChannelId o) {

return asLongText().compareTo(o.asLongText());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof GrpcChannelId)) {
return false;
}
GrpcChannelId that = (GrpcChannelId) o;
return this.clientId == null ? that.clientId == null : this.clientId.equals(that.clientId);
}

@Override
public int hashCode() {
return this.clientId == null ? 0 : this.clientId.hashCode();
}
}

public void setClientObserver(StreamObserver<TelemetryCommand> future) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ public int compareTo(ChannelId o) {
return this.id.compareTo(o.asLongText());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof RemoteChannelId)) {
return false;
}
RemoteChannelId that = (RemoteChannelId) o;
return this.id.equals(that.id);
}

@Override
public int hashCode() {
return this.id.hashCode();
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,21 @@ public String toString() {
public int compareTo(PopCheckPoint o) {
return (int) (this.getStartOffset() - o.getStartOffset());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof PopCheckPoint)) {
return false;
}
PopCheckPoint that = (PopCheckPoint) o;
return this.getStartOffset() == that.getStartOffset();
}

@Override
public int hashCode() {
return Long.hashCode(getStartOffset());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ public int compareTo(FileSegment o) {
return Long.compare(this.baseOffset, o.baseOffset);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof FileSegment)) {
return false;
}
FileSegment that = (FileSegment) o;
return this.baseOffset == that.baseOffset;
}

@Override
public int hashCode() {
return Long.hashCode(baseOffset);
}

public long getBaseOffset() {
return baseOffset;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,25 @@ public int compareTo(GroupConsumeInfo o) {
return (int) (o.diffTotal - diffTotal);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof GroupConsumeInfo)) {
return false;
}
GroupConsumeInfo that = (GroupConsumeInfo) o;
return this.count == that.count && this.diffTotal == that.diffTotal;
}

@Override
public int hashCode() {
int result = Integer.hashCode(count);
result = 31 * result + Long.hashCode(diffTotal);
return result;
}

public int getConsumeTps() {
return consumeTps;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,22 @@ public void setCount(final AtomicLong count) {
public int compareTo(final TagCountBean o) {
return (int) (o.getCount().get() - this.count.get());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof TagCountBean)) {
return false;
}
TagCountBean that = (TagCountBean) o;
return this.tag == null ? that.tag == null : this.tag.equals(that.tag);
}

@Override
public int hashCode() {
return tag == null ? 0 : tag.hashCode();
}
}
}