public RouteAddress deepCopy() { return new RouteAddress(this); }
public Object getFieldValue(_Fields field) { switch (field) { case ENDPOINT_KEY: return getEndpointKey(); case APPLICATION_TOKEN: return getApplicationToken(); case OPERATIONS_SERVER_ID: return getOperationsServerId(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof RouteAddress) return this.equals((RouteAddress)that); return false; }
/** * Performs a deep copy on <i>other</i>. */ public RouteAddress(RouteAddress other) { if (other.isSetEndpointKey()) { this.endpointKey = other.endpointKey; } if (other.isSetApplicationToken()) { this.applicationToken = other.applicationToken; } if (other.isSetOperationsServerId()) { this.operationsServerId = other.operationsServerId; } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ENDPOINT_KEY: if (value == null) { unsetEndpointKey(); } else { setEndpointKey((ByteBuffer)value); } break; case APPLICATION_TOKEN: if (value == null) { unsetApplicationToken(); } else { setApplicationToken((String)value); } break; case OPERATIONS_SERVER_ID: if (value == null) { unsetOperationsServerId(); } else { setOperationsServerId((String)value); } break; } }
case 4: // ROUTE_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.routeAddress = new RouteAddress(); struct.routeAddress.read(iprot); struct.setRouteAddressIsSet(true); } else {
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); } }
/** 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 ENDPOINT_KEY: return isSetEndpointKey(); case APPLICATION_TOKEN: return isSetApplicationToken(); case OPERATIONS_SERVER_ID: return isSetOperationsServerId(); } throw new IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Event struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.userId = iprot.readString(); struct.setUserIdIsSet(true); } if (incoming.get(1)) { struct.tenantId = iprot.readString(); struct.setTenantIdIsSet(true); } if (incoming.get(2)) { struct.endpointEvent = new EndpointEvent(); struct.endpointEvent.read(iprot); struct.setEndpointEventIsSet(true); } if (incoming.get(3)) { struct.routeAddress = new RouteAddress(); struct.routeAddress.read(iprot); struct.setRouteAddressIsSet(true); } } }
/** * Create and return new instance of <code>GlobalRouteInfo</code>. * * @param message the EndpointRouteUpdate instance * @return instance of <code>GlobalRouteInfo</code> */ public static GlobalRouteInfo fromThrift(EndpointRouteUpdate message) { RouteTableAddress address = new RouteTableAddress( EndpointObjectHash.fromBytes(message.getRouteAddress().getEndpointKey()), message.getRouteAddress().getApplicationToken(), message.getRouteAddress().getOperationsServerId()); RouteOperation operation = message.getUpdateType() == EventRouteUpdateType.ADD ? RouteOperation.ADD : RouteOperation.DELETE; return new GlobalRouteInfo(message.getTenantId(), message.getUserId(), address, message.getCfSchemaVersion(), message.getUcfHash(), operation); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_endpointKey = true && (isSetEndpointKey()); list.add(present_endpointKey); if (present_endpointKey) list.add(endpointKey); boolean present_applicationToken = true && (isSetApplicationToken()); list.add(present_applicationToken); if (present_applicationToken) list.add(applicationToken); boolean present_operationsServerId = true && (isSetOperationsServerId()); list.add(present_operationsServerId); if (present_operationsServerId) list.add(operationsServerId); return list.hashCode(); }
case 3: // ROUTE_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.routeAddress = new RouteAddress(); struct.routeAddress.read(iprot); struct.setRouteAddressIsSet(true); } else {
/** * Performs a deep copy on <i>other</i>. */ public Event(Event other) { if (other.isSetUserId()) { this.userId = other.userId; } if (other.isSetTenantId()) { this.tenantId = other.tenantId; } if (other.isSetEndpointEvent()) { this.endpointEvent = new EndpointEvent(other.endpointEvent); } if (other.isSetRouteAddress()) { this.routeAddress = new RouteAddress(other.routeAddress); } }
if (!(this_present_routeAddress && that_present_routeAddress)) return false; if (!this.routeAddress.equals(that.routeAddress)) return false;
event.getEndpointEvent().getVersion()); RouteTableAddress recipient = new RouteTableAddress( EndpointObjectHash.fromBytes(event.getRouteAddress().getEndpointKey()), event.getRouteAddress().getApplicationToken(), event.getRouteAddress().getOperationsServerId()); RemoteEndpointEvent remoteEvent = new RemoteEndpointEvent( event.getTenantId(), event.getUserId(), endpointEvent, recipient);
public boolean equals(RouteAddress that) { if (that == null) return false; boolean this_present_endpointKey = true && this.isSetEndpointKey(); boolean that_present_endpointKey = true && that.isSetEndpointKey(); if (this_present_endpointKey || that_present_endpointKey) { if (!(this_present_endpointKey && that_present_endpointKey)) return false; if (!this.endpointKey.equals(that.endpointKey)) return false; } boolean this_present_applicationToken = true && this.isSetApplicationToken(); boolean that_present_applicationToken = true && that.isSetApplicationToken(); if (this_present_applicationToken || that_present_applicationToken) { if (!(this_present_applicationToken && that_present_applicationToken)) return false; if (!this.applicationToken.equals(that.applicationToken)) return false; } boolean this_present_operationsServerId = true && this.isSetOperationsServerId(); boolean that_present_operationsServerId = true && that.isSetOperationsServerId(); if (this_present_operationsServerId || that_present_operationsServerId) { if (!(this_present_operationsServerId && that_present_operationsServerId)) return false; if (!this.operationsServerId.equals(that.operationsServerId)) return false; } return true; }
struct.routeAddress = new RouteAddress(); struct.routeAddress.read(iprot); struct.setRouteAddressIsSet(true);
/** * Performs a deep copy on <i>other</i>. */ public EndpointRouteUpdate(EndpointRouteUpdate other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetTenantId()) { this.tenantId = other.tenantId; } if (other.isSetUserId()) { this.userId = other.userId; } if (other.isSetRouteAddress()) { this.routeAddress = new RouteAddress(other.routeAddress); } if (other.isSetUpdateType()) { this.updateType = other.updateType; } this.cfSchemaVersion = other.cfSchemaVersion; if (other.isSetUcfHash()) { this.ucfHash = org.apache.thrift.TBaseHelper.copyBinary(other.ucfHash); } }
if (!(this_present_routeAddress && that_present_routeAddress)) return false; if (!this.routeAddress.equals(that.routeAddress)) return false;
lastComparison = Boolean.valueOf(isSetEndpointKey()).compareTo(other.isSetEndpointKey()); if (lastComparison != 0) { return lastComparison; if (isSetEndpointKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endpointKey, other.endpointKey); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetApplicationToken()).compareTo(other.isSetApplicationToken()); if (lastComparison != 0) { return lastComparison; if (isSetApplicationToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationToken, other.applicationToken); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetOperationsServerId()).compareTo(other.isSetOperationsServerId()); if (lastComparison != 0) { return lastComparison; if (isSetOperationsServerId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationsServerId, other.operationsServerId); if (lastComparison != 0) {