@Override public ByteBuffer getEnd() { return end.getByteBuffer(); }
@Override public ByteBuffer getStart() { return start.getByteBuffer(); }
@Override @Deprecated public ByteBuffer getStart() { return start.getByteBuffer(); }
@Override @Deprecated public ByteBuffer getEnd() { return end.getByteBuffer(); }
@Override public ByteBuffer serialize() throws Exception { if (mutationMap.isEmpty()) { throw new Exception("Mutation is empty"); } ByteBufferOutputStream out = new ByteBufferOutputStream(); TIOStreamTransport transport = new TIOStreamTransport(out); batch_mutate_args args = new batch_mutate_args(); args.setMutation_map(mutationMap); try { args.write(new TBinaryProtocol(transport)); } catch (TException e) { throw ThriftConverter.ToConnectionPoolException(e); } return out.getByteBuffer(); }
@Override public ByteBuffer serialize() throws Exception { if (mutationMap.isEmpty()) { throw new Exception("Mutation is empty"); } ByteBufferOutputStream out = new ByteBufferOutputStream(); TIOStreamTransport transport = new TIOStreamTransport(out); batch_mutate_args args = new batch_mutate_args(); args.setMutation_map(mutationMap); try { args.write(new TBinaryProtocol(transport)); } catch (TException e) { throw ThriftConverter.ToConnectionPoolException(e); } return out.getByteBuffer(); }
@Override public ByteBuffer getNext(ByteBuffer byteBuffer) { ByteBufferOutputStream next = new ByteBufferOutputStream(); try { next.write(byteBuffer); next.write((byte) 0); return next.getByteBuffer(); } finally { try { next.close(); } catch (Throwable t) { } } } }
serialized = out.getByteBuffer(); return serialized.duplicate();