protected ColumnFamily getColumnFamily() throws IOException { ColumnFamily previous = buffer.get(currentKey); // If the CF already exist in memory, we'll just continue adding to it if (previous == null) { previous = createColumnFamily(); buffer.put(currentKey, previous); // Since this new CF will be written by the next sync(), count its header. And a CF header // on disk is: // - the row key: 2 bytes size + key size bytes // - the row level deletion infos: 4 + 8 bytes currentSize += 14 + currentKey.getKey().remaining(); } return previous; }
PartitionUpdate getUpdateFor(DecoratedKey key) { assert key != null; PartitionUpdate previous = buffer.get(key); if (previous == null) { previous = createPartitionUpdate(key); currentSize += PartitionUpdate.serializer.serializedSize(previous, formatType.info.getLatestVersion().correspondingMessagingVersion()); previous.allowNewUpdates(); buffer.put(key, previous); } return previous; }
PartitionUpdate getUpdateFor(DecoratedKey key) { assert key != null; PartitionUpdate previous = buffer.get(key); if (previous == null) { previous = createPartitionUpdate(key); currentSize += PartitionUpdate.serializer.serializedSize(previous, formatType.info.getLatestVersion().correspondingMessagingVersion()); previous.allowNewUpdates(); buffer.put(key, previous); } return previous; }
PartitionUpdate getUpdateFor(DecoratedKey key) { assert key != null; PartitionUpdate previous = buffer.get(key); if (previous == null) { previous = createPartitionUpdate(key); currentSize += PartitionUpdate.serializer.serializedSize(previous, formatType.info.getLatestVersion().correspondingMessagingVersion()); previous.allowNewUpdates(); buffer.put(key, previous); } return previous; }