Tabnine Logo
ThriftEndpointConfigurationRefreshMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
ThriftEndpointConfigurationRefreshMessage
in
org.kaaproject.kaa.server.common.thrift.gen.operations

Best Java code snippets using org.kaaproject.kaa.server.common.thrift.gen.operations.ThriftEndpointConfigurationRefreshMessage (Showing top 20 results out of 315)

origin: kaaproject/kaa

private void processEndpointConfigurationRefreshMsg(ActorContext context, ThriftEndpointConfigurationRefreshMessage thriftMsg) {
 ThriftEndpointConfigurationRefreshMessage localMsg = new ThriftEndpointConfigurationRefreshMessage(thriftMsg);
 localMsg.setActorClassifier(ThriftActorClassifier.LOCAL);
 dispatchMsg(context, localMsg, clusterService::sendEndpointConfigurationRefreshMessage);
}
origin: kaaproject/kaa

public Object getFieldValue(_Fields field) {
 switch (field) {
 case ADDRESS:
  return getAddress();
 case ACTOR_CLASSIFIER:
  return getActorClassifier();
 }
 throw new IllegalStateException();
}
origin: kaaproject/kaa

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case ADDRESS:
  if (value == null) {
   unsetAddress();
  } else {
   setAddress((ThriftEntityAddress)value);
  }
  break;
 case ACTOR_CLASSIFIER:
  if (value == null) {
   unsetActorClassifier();
  } else {
   setActorClassifier((ThriftActorClassifier)value);
  }
  break;
 }
}
origin: kaaproject/kaa

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);
 }
}
origin: kaaproject/kaa

/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
 if (field == null) {
  throw new IllegalArgumentException();
 }
 switch (field) {
 case ADDRESS:
  return isSetAddress();
 case ACTOR_CLASSIFIER:
  return isSetActorClassifier();
 }
 throw new IllegalStateException();
}
origin: kaaproject/kaa

 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, sendEndpointConfigurationRefreshMessage_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
   struct.message = new ThriftEndpointConfigurationRefreshMessage();
   struct.message.read(iprot);
   struct.setMessageIsSet(true);
  }
 }
}
origin: kaaproject/kaa

    struct.address = new ThriftEntityAddress();
    struct.address.read(iprot);
    struct.setAddressIsSet(true);
   } else { 
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
   if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
    struct.actorClassifier = org.kaaproject.kaa.server.common.thrift.gen.operations.ThriftActorClassifier.findByValue(iprot.readI32());
    struct.setActorClassifierIsSet(true);
   } else { 
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
struct.validate();
origin: kaaproject/kaa

public ThriftEndpointConfigurationRefreshMessage deepCopy() {
 return new ThriftEndpointConfigurationRefreshMessage(this);
}
origin: kaaproject/kaa

 @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);
  }
 }
}
origin: kaaproject/kaa

@Override
public boolean equals(Object that) {
 if (that == null)
  return false;
 if (that instanceof ThriftEndpointConfigurationRefreshMessage)
  return this.equals((ThriftEndpointConfigurationRefreshMessage)that);
 return false;
}
origin: kaaproject/kaa

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
 try {
  read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
 } catch (org.apache.thrift.TException te) {
  throw new java.io.IOException(te);
 }
}
origin: kaaproject/kaa

/**
 * 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;
 }
}
origin: kaaproject/kaa

public void read(org.apache.thrift.protocol.TProtocol iprot, sendEndpointConfigurationRefreshMessage_args struct) throws org.apache.thrift.TException {
 org.apache.thrift.protocol.TField schemeField;
 iprot.readStructBegin();
 while (true)
 {
  schemeField = iprot.readFieldBegin();
  if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
   break;
  }
  switch (schemeField.id) {
   case 1: // MESSAGE
    if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
     struct.message = new ThriftEndpointConfigurationRefreshMessage();
     struct.message.read(iprot);
     struct.setMessageIsSet(true);
    } else { 
     org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    }
    break;
   default:
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  }
  iprot.readFieldEnd();
 }
 iprot.readStructEnd();
 // check for required fields of primitive type, which can't be checked in the validate method
 struct.validate();
}
origin: kaaproject/kaa

/**
 * Performs a deep copy on <i>other</i>.
 */
public sendEndpointConfigurationRefreshMessage_args(sendEndpointConfigurationRefreshMessage_args other) {
 if (other.isSetMessage()) {
  this.message = new ThriftEndpointConfigurationRefreshMessage(other.message);
 }
}
origin: kaaproject/kaa

public boolean equals(sendEndpointConfigurationRefreshMessage_args that) {
 if (that == null)
  return false;
 boolean this_present_message = true && this.isSetMessage();
 boolean that_present_message = true && that.isSetMessage();
 if (this_present_message || that_present_message) {
  if (!(this_present_message && that_present_message))
   return false;
  if (!this.message.equals(that.message))
   return false;
 }
 return true;
}
origin: kaaproject/kaa

@Override
public void sendEndpointConfigurationRefreshMessage(ThriftEndpointConfigurationRefreshMessage msg) {
 EndpointAddress address = fromThriftAddress(msg.getAddress());
 ActorClassifier classifier = fromThriftActorClassifier(msg.getActorClassifier());
 listener.onEndpointActorMsg(new ThriftEndpointActorMsg<>(address, classifier, msg));
}
origin: kaaproject/kaa

@Override
public int hashCode() {
 List<Object> list = new ArrayList<Object>();
 boolean present_address = true && (isSetAddress());
 list.add(present_address);
 if (present_address)
  list.add(address);
 boolean present_actorClassifier = true && (isSetActorClassifier());
 list.add(present_actorClassifier);
 if (present_actorClassifier)
  list.add(actorClassifier.getValue());
 return list.hashCode();
}
origin: kaaproject/kaa

public boolean equals(ThriftEndpointConfigurationRefreshMessage that) {
 if (that == null)
  return false;
 boolean this_present_address = true && this.isSetAddress();
 boolean that_present_address = true && that.isSetAddress();
 if (this_present_address || that_present_address) {
  if (!(this_present_address && that_present_address))
   return false;
  if (!this.address.equals(that.address))
   return false;
 }
 boolean this_present_actorClassifier = true && this.isSetActorClassifier();
 boolean that_present_actorClassifier = true && that.isSetActorClassifier();
 if (this_present_actorClassifier || that_present_actorClassifier) {
  if (!(this_present_actorClassifier && that_present_actorClassifier))
   return false;
  if (!this.actorClassifier.equals(that.actorClassifier))
   return false;
 }
 return true;
}
origin: kaaproject/kaa

@Override
public int compareTo(ThriftEndpointConfigurationRefreshMessage other) {
 if (!getClass().equals(other.getClass())) {
  return getClass().getName().compareTo(other.getClass().getName());
 }
 int lastComparison = 0;
 lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress());
 if (lastComparison != 0) {
  return lastComparison;
 }
 if (isSetAddress()) {
  lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address);
  if (lastComparison != 0) {
   return lastComparison;
  }
 }
 lastComparison = Boolean.valueOf(isSetActorClassifier()).compareTo(other.isSetActorClassifier());
 if (lastComparison != 0) {
  return lastComparison;
 }
 if (isSetActorClassifier()) {
  lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.actorClassifier, other.actorClassifier);
  if (lastComparison != 0) {
   return lastComparison;
  }
 }
 return 0;
}
origin: kaaproject/kaa

@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ThriftEndpointConfigurationRefreshMessage struct) throws org.apache.thrift.TException {
 TTupleProtocol oprot = (TTupleProtocol) prot;
 BitSet optionals = new BitSet();
 if (struct.isSetAddress()) {
  optionals.set(0);
 }
 if (struct.isSetActorClassifier()) {
  optionals.set(1);
 }
 oprot.writeBitSet(optionals, 2);
 if (struct.isSetAddress()) {
  struct.address.write(oprot);
 }
 if (struct.isSetActorClassifier()) {
  oprot.writeI32(struct.actorClassifier.getValue());
 }
}
org.kaaproject.kaa.server.common.thrift.gen.operationsThriftEndpointConfigurationRefreshMessage

Most used methods

  • <init>
    Performs a deep copy on other.
  • getActorClassifier
  • getAddress
  • setActorClassifier
  • setAddress
  • equals
  • isSetActorClassifier
    Returns true if field actorClassifier is set (has been assigned a value) and false otherwise
  • isSetAddress
    Returns true if field address is set (has been assigned a value) and false otherwise
  • read
  • setActorClassifierIsSet
  • setAddressIsSet
  • unsetActorClassifier
  • setAddressIsSet,
  • unsetActorClassifier,
  • unsetAddress,
  • validate,
  • write

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • JTextField (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now