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

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

本文整理了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

  1. @Override
  2. public int getKey() {
  3. return endPoint.hashCode();
  4. }
  5. });

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

  1. @Override
  2. public int getKey() {
  3. return remoteEndPoint.hashCode();
  4. }
  5. });

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

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

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

  1. @Override
  2. public int getKey() {
  3. return remoteEndPoint.hashCode();
  4. }
  5. });

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

  1. @Override
  2. public int getKey() {
  3. return endPoint.hashCode();
  4. }
  5. });

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

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

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

  1. @Override
  2. public int hashCode() {
  3. int result = memberAddress.hashCode();
  4. result = 31 * result + memberUuid.hashCode();
  5. result = 31 * result + masterAddress.hashCode();
  6. result = 31 * result + memberListVersion;
  7. return result;
  8. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = memberAddress.hashCode();
  4. result = 31 * result + memberUuid.hashCode();
  5. result = 31 * result + masterAddress.hashCode();
  6. result = 31 * result + memberListVersion;
  7. return result;
  8. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = address.hashCode();
  4. result = 31 * result + uuid.hashCode();
  5. return result;
  6. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = address.hashCode();
  4. result = 31 * result + uuid.hashCode();
  5. return result;
  6. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = address.hashCode();
  4. result = 31 * result + uuid.hashCode();
  5. return result;
  6. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = address != null ? address.hashCode() : 0;
  4. result = 31 * result + partitionId;
  5. result = 31 * result + schedulerName.hashCode();
  6. result = 31 * result + taskName.hashCode();
  7. return result;
  8. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = address != null ? address.hashCode() : 0;
  4. result = 31 * result + partitionId;
  5. result = 31 * result + schedulerName.hashCode();
  6. result = 31 * result + taskName.hashCode();
  7. return result;
  8. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = address != null ? address.hashCode() : 0;
  4. result = 31 * result + (state != null ? state.hashCode() : 0);
  5. return result;
  6. }
  7. }

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

  1. @Override
  2. public int hashCode() {
  3. int result = address != null ? address.hashCode() : 0;
  4. result = 31 * result + (state != null ? state.hashCode() : 0);
  5. return result;
  6. }
  7. }

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

  1. private boolean isThisNodeMasterCandidate(Collection<Address> addresses) {
  2. int thisHashCode = node.getThisAddress().hashCode();
  3. for (Address address : addresses) {
  4. if (isBlacklisted(address)) {
  5. continue;
  6. }
  7. if (node.connectionManager.getConnection(address) != null) {
  8. if (thisHashCode > address.hashCode()) {
  9. return false;
  10. }
  11. }
  12. }
  13. return true;
  14. }

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

  1. private boolean isThisNodeMasterCandidate(Collection<Address> possibleAddresses) {
  2. int thisHashCode = node.getThisAddress().hashCode();
  3. for (Address address : possibleAddresses) {
  4. if (isBlacklisted(address)) {
  5. continue;
  6. }
  7. if (node.connectionManager.getConnection(address) != null) {
  8. if (thisHashCode > address.hashCode()) {
  9. return false;
  10. }
  11. }
  12. }
  13. return true;
  14. }

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

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

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

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

相关文章