@Test void readPartShouldReturnEmptyWhenNone() { Optional<ByteBuffer> maybeBytes = testee.readPart(BUCKET_NAME, BLOB_ID, POSITION).blockOptional(); assertThat(maybeBytes).isEmpty(); }
Mono<ByteBuffer> readPart(BucketName bucketName, BlobId blobId, int position) { return cassandraAsyncExecutor.executeSingleRow( selectPart.bind() .setString(BucketBlobParts.BUCKET, bucketName.asString()) .setString(BucketBlobParts.ID, blobId.asString()) .setInt(BucketBlobParts.CHUNK_NUMBER, position)) .map(this::rowToData); }
CassandraBucketDAO { Mono<ByteBuffer> readPart(BucketName bucketName, BlobId blobId, int position) { return cassandraAsyncExecutor.executeSingleRow( selectPart.bind() .setString(BucketBlobParts.BUCKET, bucketName.asString()) .setString(BucketBlobParts.ID, blobId.asString()) .setInt(BucketBlobParts.CHUNK_NUMBER, position)) .map(this::rowToData); } }
CassandraBucketDAO { Mono<ByteBuffer> readPart(BucketName bucketName, BlobId blobId, int position) { return cassandraAsyncExecutor.executeSingleRow( selectPart.bind() .setString(BucketBlobParts.BUCKET, bucketName.asString()) .setString(BucketBlobParts.ID, blobId.asString()) .setInt(BucketBlobParts.CHUNK_NUMBER, position)) .map(this::rowToData); } @Inject @VisibleForTesting  CassandraBucketDAO(BlobId.Factory blobIdFactory, Session session); }
CassandraBucketDAO { Mono<ByteBuffer> readPart(BucketName bucketName, BlobId blobId, int position) { return cassandraAsyncExecutor.executeSingleRow( selectPart.bind() .setString(BucketBlobParts.BUCKET, bucketName.asString()) .setString(BucketBlobParts.ID, blobId.asString()) .setInt(BucketBlobParts.CHUNK_NUMBER, position)) .map(this::rowToData); } @Inject @VisibleForTesting  CassandraBucketDAO(BlobId.Factory blobIdFactory, Session session); Flux<Pair<BucketName, BlobId>> listAll(); }
CassandraBucketDAO { Mono<ByteBuffer> readPart(BucketName bucketName, BlobId blobId, int position) { return cassandraAsyncExecutor.executeSingleRow( selectPart.bind() .setString(BucketBlobParts.BUCKET, bucketName.asString()) .setString(BucketBlobParts.ID, blobId.asString()) .setInt(BucketBlobParts.CHUNK_NUMBER, position)) .map(this::rowToData); } @Inject @VisibleForTesting  CassandraBucketDAO(BlobId.Factory blobIdFactory, Session session); Flux<Pair<BucketName, BlobId>> listAll();  }