• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / iotdb / #9905

23 Aug 2023 06:20AM UTC coverage: 47.785% (-0.1%) from 47.922%
#9905

push

travis_ci

web-flow
[To rel/1.2][Metric] Fix flush point statistics (#10934)

23 of 23 new or added lines in 1 file covered. (100.0%)

79851 of 167106 relevant lines covered (47.78%)

0.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

46.15
/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/common/ConsensusGroup.java
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * or more contributor license agreements.  See the NOTICE file
4
 * distributed with this work for additional information
5
 * regarding copyright ownership.  The ASF licenses this file
6
 * to you under the Apache License, Version 2.0 (the
7
 * "License"); you may not use this file except in compliance
8
 * with the License.  You may obtain a copy of the License at
9
 *
10
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied.  See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19

20
package org.apache.iotdb.consensus.common;
21

22
import org.apache.iotdb.commons.consensus.ConsensusGroupId;
23

24
import java.util.List;
25
import java.util.Objects;
26

27
public class ConsensusGroup {
28

29
  private final ConsensusGroupId groupId;
30
  private final List<Peer> peers;
31

32
  public ConsensusGroup(ConsensusGroupId groupId, List<Peer> peers) {
1✔
33
    this.groupId = groupId;
1✔
34
    this.peers = peers;
1✔
35
  }
1✔
36

37
  public ConsensusGroupId getGroupId() {
38
    return groupId;
1✔
39
  }
40

41
  public List<Peer> getPeers() {
42
    return peers;
1✔
43
  }
44

45
  @Override
46
  public boolean equals(Object o) {
47
    if (this == o) {
×
48
      return true;
×
49
    }
50
    if (o == null || getClass() != o.getClass()) {
×
51
      return false;
×
52
    }
53
    ConsensusGroup that = (ConsensusGroup) o;
×
54
    return Objects.equals(groupId, that.groupId) && Objects.equals(peers, that.peers);
×
55
  }
56

57
  @Override
58
  public int hashCode() {
59
    return Objects.hash(groupId, peers);
×
60
  }
61
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc