Example #1
0
 @Override
 public int hashCode() {
   int result = partitionId;
   result = 31 * result + (source != null ? source.hashCode() : 0);
   result = 31 * result + (destination != null ? destination.hashCode() : 0);
   result = 31 * result + (masterUuid != null ? masterUuid.hashCode() : 0);
   return result;
 }
Example #2
0
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
   result = 31 * result + (topic != null ? topic.hashCode() : 0);
   result = 31 * result + (filter != null ? filter.hashCode() : 0);
   result = 31 * result + (subscriber != null ? subscriber.hashCode() : 0);
   return result;
 }
 private boolean isThisNodeMasterCandidate(Collection<Address> possibleAddresses) {
   int thisHashCode = node.getThisAddress().hashCode();
   for (Address address : possibleAddresses) {
     if (isBlacklisted(address)) {
       continue;
     }
     if (node.connectionManager.getConnection(address) != null) {
       if (thisHashCode > address.hashCode()) {
         return false;
       }
     }
   }
   return true;
 }