/** * Gets the modifications and deletions in this mutation. After calling this method, further * modifications to this mutation are ignored. Changes made to the returned updates do not affect * this mutation. * * @return list of modifications and deletions */ public List<ColumnUpdate> getUpdates() { serialize(); UnsynchronizedBuffer.Reader in = new UnsynchronizedBuffer.Reader(data); if (updates == null) { if (entries == 1) { updates = Collections.singletonList(deserializeColumnUpdate(in)); } else { ColumnUpdate[] tmpUpdates = new ColumnUpdate[entries]; for (int i = 0; i < entries; i++) tmpUpdates[i] = deserializeColumnUpdate(in); updates = Arrays.asList(tmpUpdates); } } return updates; }
/** * Gets the modifications and deletions in this mutation. After calling this method, further * modifications to this mutation are ignored. Changes made to the returned updates do not affect * this mutation. * * @return list of modifications and deletions */ public List<ColumnUpdate> getUpdates() { serialize(); UnsynchronizedBuffer.Reader in = new UnsynchronizedBuffer.Reader(data); if (updates == null) { if (entries == 1) { updates = Collections.singletonList(deserializeColumnUpdate(in)); } else { ColumnUpdate[] tmpUpdates = new ColumnUpdate[entries]; for (int i = 0; i < entries; i++) tmpUpdates[i] = deserializeColumnUpdate(in); updates = Arrays.asList(tmpUpdates); } } return updates; }