public RouteAddress deepCopy() { return new RouteAddress(this); }
case 4: // ROUTE_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.routeAddress = new RouteAddress(); struct.routeAddress.read(iprot); struct.setRouteAddressIsSet(true);
case 3: // ROUTE_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.routeAddress = new RouteAddress(); struct.routeAddress.read(iprot); struct.setRouteAddressIsSet(true);
@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); } } }
/** * 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); } }
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); } }
return; RouteAddress routeAddress = new RouteAddress( ByteBuffer.wrap(remoteEndpointEvent.getRecipient().getEndpointKey().getData()), remoteEndpointEvent.getRecipient().getApplicationToken(), serverId);
private List<Message> packMessage(GlobalRouteInfo routeInfo) { final EventMessageType type = EventMessageType.ENDPOINT_ROUTE_UPDATE; final List<Message> messages = new LinkedList<>(); EndpointRouteUpdate route = new EndpointRouteUpdate(); route.setTenantId(routeInfo.getTenantId()); route.setUserId(routeInfo.getUserId()); route.setUpdateType(transformUpdateType(routeInfo.getRouteOperation())); route.setCfSchemaVersion(routeInfo.getCfVersion()); route.setUcfHash(routeInfo.getUcfHash()); String opsServerId = routeInfo.getAddress().getServerId(); if (opsServerId == null) { opsServerId = id; } RouteAddress routeAddress = new RouteAddress( ByteBuffer.wrap(routeInfo.getAddress().getEndpointKey().getData()), routeInfo .getAddress().getApplicationToken(), opsServerId); route.setRouteAddress(routeAddress); messages.add(new Message(type, getEventId(), null, null, null, route, null)); return messages; }