Class GoogleCloudReactiveBucketOperations
java.lang.Object
io.micronaut.objectstorage.googlecloud.GoogleCloudReactiveBucketOperations
- All Implemented Interfaces:
ReactiveBucketOperations<com.google.cloud.storage.Bucket>
@EachBean(GoogleCloudStorageConfiguration.class)
@Requires(beans=GoogleCloudStorageConfiguration.class) @Requires(beans=GoogleCloudBucketOperations.class)
public class GoogleCloudReactiveBucketOperations
extends Object
implements ReactiveBucketOperations<com.google.cloud.storage.Bucket>
Reactive Google Cloud bucket operations.
The Google Cloud Storage client used on this branch exposes blocking bucket lifecycle methods only,
so this bean intentionally keeps the executor-backed bridge until the SDK offers a native async bucket API.
- Since:
- 3.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
ConstructorsConstructorDescriptionGoogleCloudReactiveBucketOperations(GoogleCloudBucketOperations operations, 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<com.google.cloud.storage.Bucket>>> Retrieve an existing bucket/container.
-
Constructor Details
-
GoogleCloudReactiveBucketOperations
public GoogleCloudReactiveBucketOperations(GoogleCloudBucketOperations operations, @Named("blocking") ExecutorService blockingExecutor)
-
-
Method Details
-
create
Description copied from interface:ReactiveBucketOperationsCreate a new bucket/container with the given name.- Specified by:
createin interfaceReactiveBucketOperations<com.google.cloud.storage.Bucket>- Parameters:
name- The bucket/container name.- Returns:
- a completion-only publisher.
-
retrieve
public @NonNull org.reactivestreams.Publisher<Optional<BucketEntry<com.google.cloud.storage.Bucket>>> retrieve(@NonNull String name) Description copied from interface:ReactiveBucketOperationsRetrieve an existing bucket/container.- Specified by:
retrievein interfaceReactiveBucketOperations<com.google.cloud.storage.Bucket>- 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<com.google.cloud.storage.Bucket>- 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<com.google.cloud.storage.Bucket>- Parameters:
name- The bucket/container name.- Returns:
- a publisher that emits
trueif the bucket/container exists.
-