Class MongoGridFsClient
java.lang.Object
io.vertx.reactivex.ext.mongo.MongoGridFsClient
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMongoGridFsClient(MongoGridFsClient delegate) MongoGridFsClient(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the client and release its resourcesDeletes a file by it's IDdownloadByFileName(WriteStream<Buffer> stream, String fileName) downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) downloadById(WriteStream<Buffer> stream, String id) downloadFile(String fileName) Downloads a file.downloadFileAs(String fileName, String newFileName) Downloads a file and gives it a new name.downloadFileByID(String id, String fileName) Downloads a file using the ID generated by GridFs.drop()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 ReadStreamDeletes a file by it's IDrxDownloadByFileName(WriteStream<Buffer> stream, String fileName) rxDownloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) rxDownloadById(WriteStream<Buffer> stream, String id) rxDownloadFile(String fileName) Downloads a file.rxDownloadFileAs(String fileName, String newFileName) Downloads a file and gives it a new name.rxDownloadFileByID(String id, String fileName) Downloads a file using the ID generated by GridFs.rxDrop()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.rxUploadByFileName(Flowable<Buffer> stream, String fileName) rxUploadByFileName(ReadStream<Buffer> stream, String fileName) rxUploadByFileNameWithOptions(Flowable<Buffer> stream, String fileName, GridFsUploadOptions options) rxUploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options) rxUploadFile(String fileName) Upload a file to gridfsrxUploadFileWithOptions(String fileName, GridFsUploadOptions options) Upload a file to gridfs with optionstoString()uploadByFileName(Flowable<Buffer> stream, String fileName) uploadByFileName(ReadStream<Buffer> stream, String fileName) uploadByFileNameWithOptions(Flowable<Buffer> stream, String fileName, GridFsUploadOptions options) uploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options) uploadFile(String fileName) Upload a file to gridfsuploadFileWithOptions(String fileName, GridFsUploadOptions options) Upload a file to gridfs with options
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
MongoGridFsClient
-
MongoGridFsClient
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
delete
-
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
-
rxDownloadByFileName
-
downloadByFileNameWithOptions
public Future<Long> downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) -
rxDownloadByFileNameWithOptions
public Single<Long> rxDownloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options) -
downloadById
-
rxDownloadById
-
downloadFile
-
rxDownloadFile
-
downloadFileAs
-
rxDownloadFileAs
-
downloadFileByID
-
rxDownloadFileByID
-
drop
-
rxDrop
Drops the entire file bucket with all of its contents- Returns:
- a future notified when the operation completes
-
findAllIds
-
rxFindAllIds
-
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
-
uploadByFileName
-
rxUploadByFileName
-
uploadByFileNameWithOptions
public Future<String> uploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options) -
rxUploadByFileNameWithOptions
public Single<String> rxUploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options) -
uploadByFileNameWithOptions
-
rxUploadByFileNameWithOptions
-
uploadFile
-
rxUploadFile
-
uploadFileWithOptions
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
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
-