public Object getFieldValue(_Fields field) { switch (field) { case TENANT_ID: return getTenantId(); case APPLICATION_TOKEN: return getApplicationToken(); case ENTITY_TYPE: return getEntityType(); case ENTITY_ID: return getEntityId(); } throw new IllegalStateException(); }
private EndpointAddress fromThriftAddress(ThriftEntityAddress source) { return new EndpointAddress( source.getTenantId(), source.getApplicationToken(), EndpointObjectHash.fromBytes(source.getEntityId())); }
private EndpointClusterAddress fromThriftAddress(ThriftEntityClusterAddress source) { ThriftEntityAddress address = source.getAddress(); EndpointObjectHash endpointKey = EndpointObjectHash.fromBytes(address.getEntityId()); return new EndpointClusterAddress( source.getNodeId(), address.getTenantId(), address.getApplicationToken(), endpointKey); }