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 Details

  • Method Details

    • create

      public @NonNull org.reactivestreams.Publisher<Void> create(@NonNull String name)
      Description copied from interface: ReactiveBucketOperations
      Create a new bucket/container with the given name.
      Specified by:
      create in interface ReactiveBucketOperations<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: ReactiveBucketOperations
      Retrieve an existing bucket/container.
      Specified by:
      retrieve in interface ReactiveBucketOperations<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

      public @NonNull org.reactivestreams.Publisher<Void> delete(@NonNull String name)
      Description copied from interface: ReactiveBucketOperations
      Delete a bucket/container with the given name.
      Specified by:
      delete in interface ReactiveBucketOperations<com.google.cloud.storage.Bucket>
      Parameters:
      name - The bucket/container name.
      Returns:
      a completion-only publisher.
    • exists

      public @NonNull org.reactivestreams.Publisher<Boolean> exists(@NonNull String name)
      Description copied from interface: ReactiveBucketOperations
      Checks whether a bucket/container exists.
      Specified by:
      exists in interface ReactiveBucketOperations<com.google.cloud.storage.Bucket>
      Parameters:
      name - The bucket/container name.
      Returns:
      a publisher that emits true if the bucket/container exists.