Class OracleCloudStorageReactiveOperations

java.lang.Object
io.micronaut.objectstorage.oraclecloud.OracleCloudStorageReactiveOperations
All Implemented Interfaces:
ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>

@EachBean(OracleCloudStorageConfiguration.class) @Requires(condition=ToggeableCondition.class) @Requires(beans=com.oracle.bmc.objectstorage.ObjectStorageAsyncClient.class) public final class OracleCloudStorageReactiveOperations extends Object implements ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
Reactive Oracle Cloud object storage operations.
Since:
3.0.0
Author:
Álvaro Sánchez-Mariscal
  • Constructor Summary

    Constructors
    Constructor
    Description
    OracleCloudStorageReactiveOperations(OracleCloudStorageConfiguration configuration, com.oracle.bmc.objectstorage.ObjectStorageAsyncClient objectStorageAsyncClient, com.oracle.bmc.auth.RegionProvider regionProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull org.reactivestreams.Publisher<Void>
    copy(@NonNull String sourceKey, @NonNull String destinationKey)
    Copies an object stored at sourceKey to destinationKey, within the same object storage (bucket/container).
    @NonNull org.reactivestreams.Publisher<com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
    delete(@NonNull String key)
    Deletes an object from the object storage.
    @NonNull org.reactivestreams.Publisher<Boolean>
    exists(@NonNull String key)
    Checks whether an entry with the given key exists in the object storage.
    @NonNull org.reactivestreams.Publisher<Set<String>>
    Lists the objects that exist in the object storage.
    @NonNull org.reactivestreams.Publisher<ListObjectsResponse>
    listObjects(@NonNull ListObjectsRequest request)
    Lists a page of objects that exist in the object storage.
    <E extends ObjectStorageEntry<?>>
    @NonNull org.reactivestreams.Publisher<Optional<E>>
    retrieve(@NonNull String key)
    Gets the object from object storage.
    @NonNull org.reactivestreams.Publisher<UploadResponse<com.oracle.bmc.objectstorage.responses.PutObjectResponse>>
    upload(@NonNull UploadRequest request)
    Uploads an object to the object storage.
    @NonNull org.reactivestreams.Publisher<UploadResponse<com.oracle.bmc.objectstorage.responses.PutObjectResponse>>
    upload(@NonNull UploadRequest request, @NonNull Consumer<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder> requestConsumer)
    Uploads an object to the object storage.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OracleCloudStorageReactiveOperations

      public OracleCloudStorageReactiveOperations(@Parameter OracleCloudStorageConfiguration configuration, com.oracle.bmc.objectstorage.ObjectStorageAsyncClient objectStorageAsyncClient, com.oracle.bmc.auth.RegionProvider regionProvider)
  • Method Details

    • upload

      public @NonNull org.reactivestreams.Publisher<UploadResponse<com.oracle.bmc.objectstorage.responses.PutObjectResponse>> upload(@NonNull UploadRequest request)
      Description copied from interface: ReactiveObjectStorageOperations
      Uploads an object to the object storage. If there is an existing entry, it will be updated.
      Specified by:
      upload in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Parameters:
      request - the upload request
      Returns:
      a publisher that emits the upload response
    • upload

      public @NonNull org.reactivestreams.Publisher<UploadResponse<com.oracle.bmc.objectstorage.responses.PutObjectResponse>> upload(@NonNull UploadRequest request, @NonNull Consumer<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder> requestConsumer)
      Description copied from interface: ReactiveObjectStorageOperations
      Uploads an object to the object storage. If there is an existing entry, it will be updated.
      Specified by:
      upload in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Parameters:
      request - the upload request
      requestConsumer - upload request builder consumer
      Returns:
      a publisher that emits the upload response
    • retrieve

      public <E extends ObjectStorageEntry<?>> @NonNull org.reactivestreams.Publisher<Optional<E>> retrieve(@NonNull String key)
      Description copied from interface: ReactiveObjectStorageOperations
      Gets the object from object storage.
      Specified by:
      retrieve in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Type Parameters:
      E - an instance of ObjectStorageEntry
      Parameters:
      key - the object path in the format /foo/bar/file
      Returns:
      a publisher that emits an optional object storage entry
    • delete

      public @NonNull org.reactivestreams.Publisher<com.oracle.bmc.objectstorage.responses.DeleteObjectResponse> delete(@NonNull String key)
      Description copied from interface: ReactiveObjectStorageOperations
      Deletes an object from the object storage.
      Specified by:
      delete in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Parameters:
      key - object path in the format /foo/bar/file
      Returns:
      a publisher that emits the cloud vendor-specific delete response
    • exists

      public @NonNull org.reactivestreams.Publisher<Boolean> exists(@NonNull String key)
      Description copied from interface: ReactiveObjectStorageOperations
      Checks whether an entry with the given key exists in the object storage.
      Specified by:
      exists in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Parameters:
      key - object path in the format /foo/bar/file
      Returns:
      a publisher that emits true if the entry exists, false otherwise
    • listObjects

      public @NonNull org.reactivestreams.Publisher<Set<String>> listObjects()
      Description copied from interface: ReactiveObjectStorageOperations
      Lists the objects that exist in the object storage.
      Specified by:
      listObjects in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Returns:
      a publisher that emits the full set of keys
    • listObjects

      public @NonNull org.reactivestreams.Publisher<ListObjectsResponse> listObjects(@NonNull ListObjectsRequest request)
      Description copied from interface: ReactiveObjectStorageOperations
      Lists a page of objects that exist in the object storage.
      Specified by:
      listObjects in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Parameters:
      request - the paginated listing request
      Returns:
      a publisher that emits the current page of object keys
    • copy

      public @NonNull org.reactivestreams.Publisher<Void> copy(@NonNull String sourceKey, @NonNull String destinationKey)
      Description copied from interface: ReactiveObjectStorageOperations
      Copies an object stored at sourceKey to destinationKey, within the same object storage (bucket/container). If the destination exists, it will be overwritten.
      Specified by:
      copy in interface ReactiveObjectStorageOperations<com.oracle.bmc.objectstorage.requests.PutObjectRequest.Builder, com.oracle.bmc.objectstorage.responses.PutObjectResponse, com.oracle.bmc.objectstorage.responses.DeleteObjectResponse>
      Parameters:
      sourceKey - the key of the source object
      destinationKey - the key of the destination object
      Returns:
      a completion-only publisher