Class MongoGridFsClient

    • Constructor Detail

      • MongoGridFsClient

        public MongoGridFsClient​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • delete

        public io.reactivex.rxjava3.core.Completable delete​(String id)
        Deletes a file by it's ID
        Parameters:
        id - the identifier of the file
        Returns:
      • rxDelete

        public io.reactivex.rxjava3.core.Completable rxDelete​(String id)
        Deletes a file by it's ID
        Parameters:
        id - the identifier of the file
        Returns:
      • readByFileName

        public ReadStream<Buffer> readByFileName​(String fileName)
        Read file by name to ReadStream
        Parameters:
        fileName -
        Returns:
      • readByFileNameWithOptions

        public ReadStream<Buffer> readByFileNameWithOptions​(String fileName,
                                                            GridFsDownloadOptions options)
        Read file by name to ReadStream with options
        Parameters:
        fileName -
        options -
        Returns:
      • readById

        public ReadStream<Buffer> readById​(String id)
        Read file by id to ReadStream
        Parameters:
        id -
        Returns:
      • downloadByFileName

        public io.reactivex.rxjava3.core.Single<Long> downloadByFileName​(WriteStream<Buffer> stream,
                                                                         String fileName)
      • rxDownloadByFileName

        public io.reactivex.rxjava3.core.Single<Long> rxDownloadByFileName​(WriteStream<Buffer> stream,
                                                                           String fileName)
      • downloadFile

        public io.reactivex.rxjava3.core.Single<Long> downloadFile​(String fileName)
        Downloads a file.
        Parameters:
        fileName - the name of the file to download
        Returns:
      • rxDownloadFile

        public io.reactivex.rxjava3.core.Single<Long> rxDownloadFile​(String fileName)
        Downloads a file.
        Parameters:
        fileName - the name of the file to download
        Returns:
      • downloadFileAs

        public io.reactivex.rxjava3.core.Single<Long> downloadFileAs​(String fileName,
                                                                     String newFileName)
        Downloads a file and gives it a new name.
        Parameters:
        fileName - the name of the file to download
        newFileName - the name the file should be saved as
        Returns:
      • rxDownloadFileAs

        public io.reactivex.rxjava3.core.Single<Long> rxDownloadFileAs​(String fileName,
                                                                       String newFileName)
        Downloads a file and gives it a new name.
        Parameters:
        fileName - the name of the file to download
        newFileName - the name the file should be saved as
        Returns:
      • downloadFileByID

        public io.reactivex.rxjava3.core.Single<Long> downloadFileByID​(String id,
                                                                       String fileName)
        Downloads a file using the ID generated by GridFs.
        Parameters:
        id - the GridFs Object ID of the file to download
        fileName -
        Returns:
      • rxDownloadFileByID

        public io.reactivex.rxjava3.core.Single<Long> rxDownloadFileByID​(String id,
                                                                         String fileName)
        Downloads a file using the ID generated by GridFs.
        Parameters:
        id - the GridFs Object ID of the file to download
        fileName -
        Returns:
      • drop

        public io.reactivex.rxjava3.core.Completable drop()
        Drops the entire file bucket with all of its contents
        Returns:
      • rxDrop

        public io.reactivex.rxjava3.core.Completable rxDrop()
        Drops the entire file bucket with all of its contents
        Returns:
      • findAllIds

        public io.reactivex.rxjava3.core.Single<List<String>> findAllIds()
        Finds all file ids in the bucket
        Returns:
      • rxFindAllIds

        public io.reactivex.rxjava3.core.Single<List<String>> rxFindAllIds()
        Finds all file ids in the bucket
        Returns:
      • findIds

        public io.reactivex.rxjava3.core.Single<List<String>> findIds​(JsonObject query)
        Finds all file ids that match a query.
        Parameters:
        query - a bson query expressed as json that will be used to match files
        Returns:
      • rxFindIds

        public io.reactivex.rxjava3.core.Single<List<String>> rxFindIds​(JsonObject query)
        Finds all file ids that match a query.
        Parameters:
        query - a bson query expressed as json that will be used to match files
        Returns:
      • uploadByFileName

        public io.reactivex.rxjava3.core.Single<String> uploadByFileName​(io.reactivex.rxjava3.core.Flowable<Buffer> stream,
                                                                         String fileName)
      • rxUploadByFileName

        public io.reactivex.rxjava3.core.Single<String> rxUploadByFileName​(io.reactivex.rxjava3.core.Flowable<Buffer> stream,
                                                                           String fileName)
      • uploadByFileNameWithOptions

        public io.reactivex.rxjava3.core.Single<String> uploadByFileNameWithOptions​(io.reactivex.rxjava3.core.Flowable<Buffer> stream,
                                                                                    String fileName,
                                                                                    GridFsUploadOptions options)
      • rxUploadByFileNameWithOptions

        public io.reactivex.rxjava3.core.Single<String> rxUploadByFileNameWithOptions​(io.reactivex.rxjava3.core.Flowable<Buffer> stream,
                                                                                      String fileName,
                                                                                      GridFsUploadOptions options)
      • uploadFile

        public io.reactivex.rxjava3.core.Single<String> uploadFile​(String fileName)
        Upload a file to gridfs
        Parameters:
        fileName - the name of the file to store in gridfs
        Returns:
      • rxUploadFile

        public io.reactivex.rxjava3.core.Single<String> rxUploadFile​(String fileName)
        Upload a file to gridfs
        Parameters:
        fileName - the name of the file to store in gridfs
        Returns:
      • uploadFileWithOptions

        public io.reactivex.rxjava3.core.Single<String> uploadFileWithOptions​(String fileName,
                                                                              GridFsUploadOptions options)
        Upload a file to gridfs with options
        Parameters:
        fileName - the name of the file to store in gridfs
        options - GridFsUploadOptions for specifying metadata and chunk size
        Returns:
      • rxUploadFileWithOptions

        public io.reactivex.rxjava3.core.Single<String> rxUploadFileWithOptions​(String fileName,
                                                                                GridFsUploadOptions options)
        Upload a file to gridfs with options
        Parameters:
        fileName - the name of the file to store in gridfs
        options - GridFsUploadOptions for specifying metadata and chunk size
        Returns:
      • close

        public void close()
        Close the client and release its resources