this.transportFactory = transportFactory;
this.topologyId = topologyId;
}
public byte[] get(byte[] key, Flag[] flags) {
Transport transport = transportFactory.getTransport(key);
try {
short status = sendKeyOperation(key, transport, GET_REQUEST, flags, GET_RESPONSE);
if (status == KEY_DOES_NOT_EXIST_STATUS) {
return null;
}
if (status == NO_ERROR_STATUS) {
return transport.readArray();
}
} finally {
releaseTransport(transport);
}
throw new IllegalStateException("We should not reach here!");