private void processUnicastNotificationMsg(ActorContext context, ThriftUnicastNotificationMessage thriftMsg) { ThriftUnicastNotificationMessage localMsg = new ThriftUnicastNotificationMessage(thriftMsg); localMsg.setActorClassifier(ThriftActorClassifier.LOCAL); dispatchMsg(context, localMsg, clusterService::sendUnicastNotificationMessage); }
public Object getFieldValue(_Fields field) { switch (field) { case ADDRESS: return getAddress(); case ACTOR_CLASSIFIER: return getActorClassifier(); case NOTIFICATION_ID: return getNotificationId(); } throw new IllegalStateException(); }
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; case NOTIFICATION_ID: if (value == null) { unsetNotificationId(); } else { setNotificationId((String)value); } break; } }
/** 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(); case NOTIFICATION_ID: return isSetNotificationId(); } throw new IllegalStateException(); }
ThriftUnicastNotificationMessage nf = new ThriftUnicastNotificationMessage(); nf.setAddress( new ThriftEntityAddress( appDto.getTenantId(), nf.setActorClassifier(ThriftActorClassifier.GLOBAL); nf.setNotificationId(notificationDto.getId()); if (LOG.isTraceEnabled()) { LOG.trace("Sending message {} to [{}]",
@Override public void onUnicastNotificationMessage(ThriftUnicastNotificationMessage msg) { EndpointAddress address = fromThriftAddress(msg.getAddress()); ActorClassifier classifier = fromThriftActorClassifier(msg.getActorClassifier()); listener.onEndpointActorMsg(new ThriftEndpointActorMsg<>(address, classifier, msg)); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, onUnicastNotification_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.message = new ThriftUnicastNotificationMessage(); struct.message.read(iprot); struct.setMessageIsSet(true); } } }
public ThriftUnicastNotificationMessage deepCopy() { return new ThriftUnicastNotificationMessage(this); }
private void processUnicastNotificationMsg(ActorContext context, ThriftUnicastNotificationMessage thriftMsg) { processNotification(context, NotificationMessage.fromUnicastId(thriftMsg.getNotificationId())); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ThriftUnicastNotificationMessage) return this.equals((ThriftUnicastNotificationMessage)that); return false; }
/** * 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; } }
public void read(org.apache.thrift.protocol.TProtocol iprot, onUnicastNotification_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 ThriftUnicastNotificationMessage(); 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(); }
/** * Performs a deep copy on <i>other</i>. */ public onUnicastNotification_args(onUnicastNotification_args other) { if (other.isSetMessage()) { this.message = new ThriftUnicastNotificationMessage(other.message); } }
public boolean equals(onUnicastNotification_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; }
public boolean equals(ThriftUnicastNotificationMessage 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; } boolean this_present_notificationId = true && this.isSetNotificationId(); boolean that_present_notificationId = true && that.isSetNotificationId(); if (this_present_notificationId || that_present_notificationId) { if (!(this_present_notificationId && that_present_notificationId)) return false; if (!this.notificationId.equals(that.notificationId)) return false; } return true; }
@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()); boolean present_notificationId = true && (isSetNotificationId()); list.add(present_notificationId); if (present_notificationId) list.add(notificationId); return list.hashCode(); }
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) { 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) { lastComparison = Boolean.valueOf(isSetNotificationId()).compareTo(other.isSetNotificationId()); if (lastComparison != 0) { return lastComparison; if (isSetNotificationId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notificationId, other.notificationId); if (lastComparison != 0) {
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ThriftUnicastNotificationMessage 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); } if (struct.isSetNotificationId()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAddress()) { struct.address.write(oprot); } if (struct.isSetActorClassifier()) { oprot.writeI32(struct.actorClassifier.getValue()); } if (struct.isSetNotificationId()) { oprot.writeString(struct.notificationId); } }