com.hazelcast.nio.Address.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中com.hazelcast.nio.Address.hashCode()方法的一些代码示例,展示了Address.hashCode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.hashCode()方法的具体详情如下:
包路径:com.hazelcast.nio.Address
类名称:Address
方法名:hashCode

Address.hashCode介绍

暂无

代码示例

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
  public int getKey() {
    return endPoint.hashCode();
  }
});

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
  public int getKey() {
    return remoteEndPoint.hashCode();
  }
});

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((address == null) ? 0 : address.hashCode());
  return result;
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
  public int getKey() {
    return remoteEndPoint.hashCode();
  }
});

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
  public int getKey() {
    return endPoint.hashCode();
  }
});

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((address == null) ? 0 : address.hashCode());
  return result;
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public int hashCode() {
  int result = memberAddress.hashCode();
  result = 31 * result + memberUuid.hashCode();
  result = 31 * result + masterAddress.hashCode();
  result = 31 * result + memberListVersion;
  return result;
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public int hashCode() {
  int result = memberAddress.hashCode();
  result = 31 * result + memberUuid.hashCode();
  result = 31 * result + masterAddress.hashCode();
  result = 31 * result + memberListVersion;
  return result;
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public int hashCode() {
  int result = address.hashCode();
  result = 31 * result + uuid.hashCode();
  return result;
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public int hashCode() {
  int result = address.hashCode();
  result = 31 * result + uuid.hashCode();
  return result;
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public int hashCode() {
  int result = address.hashCode();
  result = 31 * result + uuid.hashCode();
  return result;
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public int hashCode() {
  int result = address != null ? address.hashCode() : 0;
  result = 31 * result + partitionId;
  result = 31 * result + schedulerName.hashCode();
  result = 31 * result + taskName.hashCode();
  return result;
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public int hashCode() {
  int result = address != null ? address.hashCode() : 0;
  result = 31 * result + partitionId;
  result = 31 * result + schedulerName.hashCode();
  result = 31 * result + taskName.hashCode();
  return result;
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
  public int hashCode() {
    int result = address != null ? address.hashCode() : 0;
    result = 31 * result + (state != null ? state.hashCode() : 0);
    return result;
  }
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
  public int hashCode() {
    int result = address != null ? address.hashCode() : 0;
    result = 31 * result + (state != null ? state.hashCode() : 0);
    return result;
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

private boolean isThisNodeMasterCandidate(Collection<Address> addresses) {
  int thisHashCode = node.getThisAddress().hashCode();
  for (Address address : addresses) {
    if (isBlacklisted(address)) {
      continue;
    }
    if (node.connectionManager.getConnection(address) != null) {
      if (thisHashCode > address.hashCode()) {
        return false;
      }
    }
  }
  return true;
}

代码示例来源:origin: com.hazelcast/hazelcast-all

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;
}

代码示例来源:origin: com.hazelcast/hazelcast-all

private void sendInvalidations(String dataStructureName, List<Invalidation> invalidations) {
  // There will always be at least one listener which listens invalidations. This is the reason behind eager creation
  // of BatchNearCacheInvalidation instance here. There is a causality between listener and invalidation. Only if we have
  // a listener, we can have an invalidation, otherwise invalidations are not generated.
  Invalidation invalidation = new BatchNearCacheInvalidation(dataStructureName, invalidations);
  Collection<EventRegistration> registrations = eventService.getRegistrations(serviceName, dataStructureName);
  for (EventRegistration registration : registrations) {
    if (eventFilter.apply(registration)) {
      // find worker queue of striped executor by using subscribers' address.
      // we want to send all batch invalidations belonging to same subscriber go into
      // the same workers queue.
      int orderKey = registration.getSubscriber().hashCode();
      eventService.publishEvent(serviceName, registration, invalidation, orderKey);
    }
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

private void sendInvalidations(String dataStructureName, List<Invalidation> invalidations) {
  // There will always be at least one listener which listens invalidations. This is the reason behind eager creation
  // of BatchNearCacheInvalidation instance here. There is a causality between listener and invalidation. Only if we have
  // a listener, we can have an invalidation, otherwise invalidations are not generated.
  Invalidation invalidation = new BatchNearCacheInvalidation(dataStructureName, invalidations);
  Collection<EventRegistration> registrations = eventService.getRegistrations(serviceName, dataStructureName);
  for (EventRegistration registration : registrations) {
    if (eventFilter.apply(registration)) {
      // find worker queue of striped executor by using subscribers' address.
      // we want to send all batch invalidations belonging to same subscriber go into
      // the same workers queue.
      int orderKey = registration.getSubscriber().hashCode();
      eventService.publishEvent(serviceName, registration, invalidation, orderKey);
    }
  }
}

相关文章