<http://apache-ignite-users.70518.x6.nabble.com/file/t1795/Capture.jpg> 


See the image attached. I have put keys into the cache using the equals
method as follows:


@Override
  public boolean equals(Object obj) {
    HierarchyMasterKey hierarchyMasterKey = (HierarchyMasterKey) obj;
    return equalTo(this.hmCustNo, hierarchyMasterKey.hmCustNo) &&
              equalTo(this.hmFromDate, hierarchyMasterKey.hmFromDate) &&
              equalTo(this.hmParentCustNo,
hierarchyMasterKey.hmParentCustNo) &&
              equalTo(this.hmActNo, hierarchyMasterKey.hmActNo);
  }

(equalTo method is basically null safe equals check.)

and hashCode is computed as below:

        @Override
        public int hashCode() {
                return Objects.hash(hmCustNo,hmActNo);
        }


When I try to get from it,
the equals method won't get executed. Why is this so? How does ignite get
the key without executing equals?

[I have a cache that has a HierarchyMasterKey and a list of HierarchyMaster
as values]





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to