Class DefaultReactiveBucketOperations<T>
java.lang.Object
io.micronaut.objectstorage.internal.DefaultReactiveBucketOperations<T>
- Type Parameters:
T- The provider-native bucket/container representation type.
- All Implemented Interfaces:
ReactiveBucketOperations<T>
- Direct Known Subclasses:
LocalStorageReactiveBucketOperations
@Internal
public class DefaultReactiveBucketOperations<T>
extends Object
implements ReactiveBucketOperations<T>
Executor-backed reactive adapter for the blocking bucket/container contract.
- Since:
- 3.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultReactiveBucketOperations(BucketOperations<T> delegate, ExecutorService blockingExecutor) -
Method Summary
Modifier and TypeMethodDescription@NonNull org.reactivestreams.Publisher<Void> Create a new bucket/container with the given name.@NonNull org.reactivestreams.Publisher<Void> Delete a bucket/container with the given name.@NonNull org.reactivestreams.Publisher<Boolean> Checks whether a bucket/container exists.@NonNull org.reactivestreams.Publisher<Optional<BucketEntry<T>>> Retrieve an existing bucket/container.
-
Constructor Details
-
DefaultReactiveBucketOperations
public DefaultReactiveBucketOperations(BucketOperations<T> delegate, ExecutorService blockingExecutor)
-
-
Method Details
-
create
Description copied from interface:ReactiveBucketOperationsCreate a new bucket/container with the given name.- Specified by:
createin interfaceReactiveBucketOperations<T>- Parameters:
name- The bucket/container name.- Returns:
- a completion-only publisher.
-
retrieve
public @NonNull org.reactivestreams.Publisher<Optional<BucketEntry<T>>> retrieve(@NonNull String name) Description copied from interface:ReactiveBucketOperationsRetrieve an existing bucket/container.- Specified by:
retrievein interfaceReactiveBucketOperations<T>- Parameters:
name- The bucket/container name.- Returns:
- a publisher that emits the provider-native bucket/container data if it exists.
-
delete
Description copied from interface:ReactiveBucketOperationsDelete a bucket/container with the given name.- Specified by:
deletein interfaceReactiveBucketOperations<T>- Parameters:
name- The bucket/container name.- Returns:
- a completion-only publisher.
-
exists
Description copied from interface:ReactiveBucketOperationsChecks whether a bucket/container exists.- Specified by:
existsin interfaceReactiveBucketOperations<T>- Parameters:
name- The bucket/container name.- Returns:
- a publisher that emits
trueif the bucket/container exists.
-