/** * Return the next 16 bytes asa UUID * @return */ public UUID readUUID() { return UUID_SERIALIZER.fromByteBuffer( getNext() ); }
@Override public boolean accept(ByteBuffer slabId, boolean open, ByteBuffer nextSlabId) { UUID nextSlabUUID = !foundStartingSlab && nextSlabId != null ? TimeUUIDSerializer.get().fromByteBuffer(nextSlabId.duplicate()) : null; // If the nextSlab's UUID is less than the desired timestamp, then skip reading events from this slab if (nextSlabUUID != null && TimeUUIDs.compareTimestamps(nextSlabUUID, sinceUUID) < 0) { return false; } if (!foundStartingSlab) { // Log the slab that we start reading from foundStartingSlab = true; _log.info("Starting to replay {} from slabid {}, for since timestamp of {}", channel, UUIDSerializer.get().fromByteBuffer(slabId), ISO_FORMATTER.format(since.toInstant())); } return true; } };
@Override public boolean accept(ByteBuffer slabId, boolean open, ByteBuffer nextSlabId) { UUID nextSlabUUID = !foundStartingSlab && nextSlabId != null ? TimeUUIDSerializer.get().fromByteBuffer(nextSlabId.duplicate()) : null; // If the nextSlab's UUID is less than the desired timestamp, then skip reading events from this slab if (nextSlabUUID != null && TimeUUIDs.compareTimestamps(nextSlabUUID, sinceUUID) < 0) { return false; } if (!foundStartingSlab) { // Log the slab that we start reading from foundStartingSlab = true; _log.info("Starting to replay {} from slabid {}, for since timestamp of {}", channel, UUIDSerializer.get().fromByteBuffer(slabId), ISO_FORMATTER.format(since.toInstant())); } return true; } };
@Override public UUID getUUIDValue() { return (isBlob) ? UUIDSerializer.get().fromByteBuffer(row.getBytes(index)) : row.getUUID(index); }