private byte[] obj2bytes(Object o, boolean isKey) {
try {
return marshaller.objectToByteBuffer(o, isKey ? estimateKeySize : estimateValueSize);
} catch (IOException ioe) {
throw new HotRodClientException(
"Unable to marshall object of type [" + o.getClass().getName() + "]", ioe);
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
return null;
}