Package io.vertx.rxjava3.ext.mongo
Class MongoGridFsClient
java.lang.Object
io.vertx.rxjava3.ext.mongo.MongoGridFsClient
- All Implemented Interfaces:
RxDelegate
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMongoGridFsClient(MongoGridFsClient delegate) MongoGridFsClient(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the client and release its resourcesio.reactivex.rxjava3.core.CompletableDeletes a file by it's IDio.reactivex.rxjava3.core.Single<Long>downloadByFileName(WriteStream<Buffer> stream, String fileName) io.reactivex.rxjava3.core.Single<Long>downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) io.reactivex.rxjava3.core.Single<Long>downloadById(WriteStream<Buffer> stream, String id) io.reactivex.rxjava3.core.Single<Long>downloadFile(String fileName) Downloads a file.io.reactivex.rxjava3.core.Single<Long>downloadFileAs(String fileName, String newFileName) Downloads a file and gives it a new name.io.reactivex.rxjava3.core.Single<Long>downloadFileByID(String id, String fileName) Downloads a file using the ID generated by GridFs.io.reactivex.rxjava3.core.Completabledrop()Drops the entire file bucket with all of its contentsbooleanFinds all file ids in the bucketfindIds(JsonObject query) Finds all file ids that match a query.inthashCode()static MongoGridFsClientreadByFileName(String fileName) Read file by name to ReadStreamreadByFileNameWithOptions(String fileName, GridFsDownloadOptions options) Read file by name to ReadStream with optionsRead file by id to ReadStreamio.reactivex.rxjava3.core.CompletableDeletes a file by it's IDio.reactivex.rxjava3.core.Single<Long>rxDownloadByFileName(WriteStream<Buffer> stream, String fileName) io.reactivex.rxjava3.core.Single<Long>rxDownloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) io.reactivex.rxjava3.core.Single<Long>rxDownloadById(WriteStream<Buffer> stream, String id) io.reactivex.rxjava3.core.Single<Long>rxDownloadFile(String fileName) Downloads a file.io.reactivex.rxjava3.core.Single<Long>rxDownloadFileAs(String fileName, String newFileName) Downloads a file and gives it a new name.io.reactivex.rxjava3.core.Single<Long>rxDownloadFileByID(String id, String fileName) Downloads a file using the ID generated by GridFs.io.reactivex.rxjava3.core.CompletablerxDrop()Drops the entire file bucket with all of its contentsFinds all file ids in the bucketrxFindIds(JsonObject query) Finds all file ids that match a query.io.reactivex.rxjava3.core.Single<String>rxUploadByFileName(io.reactivex.rxjava3.core.Flowable<Buffer> stream, String fileName) io.reactivex.rxjava3.core.Single<String>rxUploadByFileNameWithOptions(io.reactivex.rxjava3.core.Flowable<Buffer> stream, String fileName, GridFsUploadOptions options) io.reactivex.rxjava3.core.Single<String>rxUploadFile(String fileName) Upload a file to gridfsio.reactivex.rxjava3.core.Single<String>rxUploadFileWithOptions(String fileName, GridFsUploadOptions options) Upload a file to gridfs with optionstoString()io.reactivex.rxjava3.core.Single<String>uploadByFileName(io.reactivex.rxjava3.core.Flowable<Buffer> stream, String fileName) io.reactivex.rxjava3.core.Single<String>uploadByFileNameWithOptions(io.reactivex.rxjava3.core.Flowable<Buffer> stream, String fileName, GridFsUploadOptions options) io.reactivex.rxjava3.core.Single<String>uploadFile(String fileName) Upload a file to gridfsio.reactivex.rxjava3.core.Single<String>uploadFileWithOptions(String fileName, GridFsUploadOptions options) Upload a file to gridfs with options
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
MongoGridFsClient
-
MongoGridFsClient
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate
-
delete
Deletes a file by it's ID- Parameters:
id- the identifier of the file- Returns:
- a future notified when the operation completes
-
rxDelete
Deletes a file by it's ID- Parameters:
id- the identifier of the file- Returns:
- a future notified when the operation completes
-
readByFileName
Read file by name to ReadStream- Parameters:
fileName-- Returns:
-
readByFileNameWithOptions
Read file by name to ReadStream with options- Parameters:
fileName-options-- Returns:
-
readById
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) -
downloadByFileNameWithOptions
public io.reactivex.rxjava3.core.Single<Long> downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) -
rxDownloadByFileNameWithOptions
public io.reactivex.rxjava3.core.Single<Long> rxDownloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) -
downloadById
-
rxDownloadById
-
downloadFile
Downloads a file.- Parameters:
fileName- the name of the file to download- Returns:
- a future notified with the result
-
rxDownloadFile
Downloads a file.- Parameters:
fileName- the name of the file to download- Returns:
- a future notified with the result
-
downloadFileAs
Downloads a file and gives it a new name.- Parameters:
fileName- the name of the file to downloadnewFileName- the name the file should be saved as- Returns:
- a future notified with the result
-
rxDownloadFileAs
Downloads a file and gives it a new name.- Parameters:
fileName- the name of the file to downloadnewFileName- the name the file should be saved as- Returns:
- a future notified with the result
-
downloadFileByID
Downloads a file using the ID generated by GridFs.- Parameters:
id- the GridFs Object ID of the file to downloadfileName-- Returns:
- a future notified with the result
-
rxDownloadFileByID
Downloads a file using the ID generated by GridFs.- Parameters:
id- the GridFs Object ID of the file to downloadfileName-- Returns:
- a future notified with the result
-
drop
public io.reactivex.rxjava3.core.Completable drop()Drops the entire file bucket with all of its contents- Returns:
- a future notified when the operation completes
-
rxDrop
public io.reactivex.rxjava3.core.Completable rxDrop()Drops the entire file bucket with all of its contents- Returns:
- a future notified when the operation completes
-
findAllIds
Finds all file ids in the bucket- Returns:
- a future notified with the result
-
rxFindAllIds
Finds all file ids in the bucket- Returns:
- a future notified with the result
-
findIds
Finds all file ids that match a query.- Parameters:
query- a bson query expressed as json that will be used to match files- Returns:
- a future notified with the result
-
rxFindIds
Finds all file ids that match a query.- Parameters:
query- a bson query expressed as json that will be used to match files- Returns:
- a future notified with the result
-
uploadByFileName
-
rxUploadByFileName
-
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
Upload a file to gridfs- Parameters:
fileName- the name of the file to store in gridfs- Returns:
- a future notified with the result
-
rxUploadFile
Upload a file to gridfs- Parameters:
fileName- the name of the file to store in gridfs- Returns:
- a future notified with the result
-
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 gridfsoptions-GridFsUploadOptionsfor specifying metadata and chunk size- Returns:
- a future notified with the result
-
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 gridfsoptions-GridFsUploadOptionsfor specifying metadata and chunk size- Returns:
- a future notified with the result
-
close
public void close()Close the client and release its resources -
newInstance
-