public ThriftEntityAddress deepCopy() { return new ThriftEntityAddress(this); }
/** * Performs a deep copy on <i>other</i>. */ public ThriftEntityClusterAddress(ThriftEntityClusterAddress other) { if (other.isSetNodeId()) { this.nodeId = other.nodeId; } if (other.isSetAddress()) { this.address = new ThriftEntityAddress(other.address); } }
/** * Performs a deep copy on <i>other</i>. */ public ThriftEndpointConfigurationRefreshMessage(ThriftEndpointConfigurationRefreshMessage other) { if (other.isSetAddress()) { this.address = new ThriftEntityAddress(other.address); } if (other.isSetActorClassifier()) { this.actorClassifier = other.actorClassifier; } }
/** * Performs a deep copy on <i>other</i>. */ public ThriftServerProfileUpdateMessage(ThriftServerProfileUpdateMessage other) { if (other.isSetAddress()) { this.address = new ThriftEntityAddress(other.address); } if (other.isSetActorClassifier()) { this.actorClassifier = other.actorClassifier; } }
/** * Performs a deep copy on <i>other</i>. */ public ThriftEndpointDeregistrationMessage(ThriftEndpointDeregistrationMessage other) { if (other.isSetAddress()) { this.address = new ThriftEntityAddress(other.address); } if (other.isSetActorClassifier()) { this.actorClassifier = other.actorClassifier; } }
case 2: // ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true);
/** * Performs a deep copy on <i>other</i>. */ public ThriftUnicastNotificationMessage(ThriftUnicastNotificationMessage other) { if (other.isSetAddress()) { this.address = new ThriftEntityAddress(other.address); } if (other.isSetActorClassifier()) { this.actorClassifier = other.actorClassifier; } if (other.isSetNotificationId()) { this.notificationId = other.notificationId; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ThriftEntityClusterAddress struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.nodeId = iprot.readString(); struct.setNodeIdIsSet(true); } if (incoming.get(1)) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true); } } }
case 1: // ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true);
case 1: // ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true);
case 1: // ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ThriftEndpointConfigurationRefreshMessage struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true); } if (incoming.get(1)) { struct.actorClassifier = org.kaaproject.kaa.server.common.thrift.gen.operations.ThriftActorClassifier.findByValue(iprot.readI32()); struct.setActorClassifierIsSet(true); } } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ThriftServerProfileUpdateMessage struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true); } if (incoming.get(1)) { struct.actorClassifier = org.kaaproject.kaa.server.common.thrift.gen.operations.ThriftActorClassifier.findByValue(iprot.readI32()); struct.setActorClassifierIsSet(true); } } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ThriftEndpointDeregistrationMessage struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true); } if (incoming.get(1)) { struct.actorClassifier = org.kaaproject.kaa.server.common.thrift.gen.operations.ThriftActorClassifier.findByValue(iprot.readI32()); struct.setActorClassifierIsSet(true); } } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ThriftUnicastNotificationMessage struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.address = new ThriftEntityAddress(); struct.address.read(iprot); struct.setAddressIsSet(true); } if (incoming.get(1)) { struct.actorClassifier = org.kaaproject.kaa.server.common.thrift.gen.operations.ThriftActorClassifier.findByValue(iprot.readI32()); struct.setActorClassifierIsSet(true); } if (incoming.get(2)) { struct.notificationId = iprot.readString(); struct.setNotificationIdIsSet(true); } } }
private ThriftEntityAddress toEntityAddress(EntityClusterAddress source) { ThriftEntityAddress address = new ThriftEntityAddress(); address.setTenantId(source.getTenantId()); address.setApplicationToken(source.getAppToken()); address.setEntityId(source.getEntityId()); return address; }
ThriftServerProfileUpdateMessage nf = new ThriftServerProfileUpdateMessage(); nf.setAddress( new ThriftEntityAddress( appDto.getTenantId(), appDto.getApplicationToken(),
private void sendEndpointConfigurationRefreshMessage(EndpointSpecificConfigurationDto configuration) { byte[] endpointKeyHashBytes = configuration.getEndpointKeyHash(); EndpointProfileDto endpointProfile = endpointService.findEndpointProfileByKeyHash(endpointKeyHashBytes); if (!configuration.getConfigurationSchemaVersion().equals(endpointProfile.getConfigurationVersion())) { return; } checkNeighbors(); String endpointKeyHash = Base64Util.encode(configuration.getEndpointKeyHash()); ApplicationDto appDto = applicationService.findAppById(endpointProfile.getApplicationId()); OperationsNodeInfo server = resolve(endpointKeyHash); if (server != null) { ThriftEndpointConfigurationRefreshMessage msg = new ThriftEndpointConfigurationRefreshMessage(); msg.setAddress(new ThriftEntityAddress(appDto.getTenantId(), appDto.getApplicationToken(), ThriftClusterEntityType.ENDPOINT, ByteBuffer.wrap(endpointKeyHashBytes))); msg.setActorClassifier(ThriftActorClassifier.GLOBAL); if (LOG.isTraceEnabled()) { LOG.trace("Sending message {} to [{}]", msg, Neighbors.getServerId(server.getConnectionInfo())); } neighbors.sendMessage(server.getConnectionInfo(), OperationsServiceMsg.fromEndpointConfigurationRefresh(msg)); } else { LOG.warn("Can't find server for endpoint [{}]", endpointKeyHash); } }
@Override public void removeEndpointProfile(EndpointProfileDto endpointProfile) throws ControlServiceException { checkNeighbors(); byte[] endpointKeyHash = endpointProfile.getEndpointKeyHash(); this.endpointService.removeEndpointProfileByKeyHash(endpointKeyHash); ApplicationDto appDto = getApplication(endpointProfile.getApplicationId()); ThriftEndpointDeregistrationMessage nf = new ThriftEndpointDeregistrationMessage(); nf.setAddress( new ThriftEntityAddress( appDto.getTenantId(), appDto.getApplicationToken(), ThriftClusterEntityType.ENDPOINT, ByteBuffer.wrap(endpointKeyHash) ) ); nf.setActorClassifier(ThriftActorClassifier.APPLICATION); neighbors.brodcastMessage(OperationsServiceMsg.fromDeregistration(nf)); }
ThriftUnicastNotificationMessage nf = new ThriftUnicastNotificationMessage(); nf.setAddress( new ThriftEntityAddress( appDto.getTenantId(), appDto.getApplicationToken(),