Package one.microstream.afs.mongodb
Interface MongoDbConnector
- All Superinterfaces:
AutoCloseable
,BlobStoreConnector
- All Known Implementing Classes:
MongoDbConnector.Default
,MongoDbConnector.GridFs
public interface MongoDbConnector extends BlobStoreConnector
Connector for MongoDB database and GridFS.
First create a connection to a MongoDB database.
MongoDatabase database = ... BlobStoreFileSystem fileSystem = BlobStoreFileSystem.New( MongoDbConnector.New(database) );or
BlobStoreFileSystem fileSystem = BlobStoreFileSystem.New( MongoDbConnector.GridFs(database) );
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
MongoDbConnector.Default
static class
MongoDbConnector.GridFs
Nested classes/interfaces inherited from interface one.microstream.afs.blobstore.BlobStoreConnector
BlobStoreConnector.Abstract<B>
-
Method Summary
Static Methods Modifier and Type Method Description static MongoDbConnector
Caching(com.mongodb.client.MongoDatabase database)
Pseudo-constructor method which creates a newMongoDbConnector
with cache.static MongoDbConnector
GridFs(com.mongodb.client.MongoDatabase database)
Pseudo-constructor method which creates a newMongoDbConnector
for GridFS.static MongoDbConnector
GridFsCaching(com.mongodb.client.MongoDatabase database)
Pseudo-constructor method which creates a newMongoDbConnector
for GridFS with cache.static MongoDbConnector
New(com.mongodb.client.MongoDatabase database)
Pseudo-constructor method which creates a newMongoDbConnector
.Methods inherited from interface one.microstream.afs.blobstore.BlobStoreConnector
close, copyFile, createDirectory, createFile, deleteFile, directoryExists, fileExists, fileSize, moveFile, readData, readData, truncateFile, visitChildren, writeData
-
Method Details
-
New
Pseudo-constructor method which creates a newMongoDbConnector
.- Parameters:
database
- connection to the MongoDB database- Returns:
- a new
MongoDbConnector
-
Caching
Pseudo-constructor method which creates a newMongoDbConnector
with cache.- Parameters:
database
- connection to the MongoDB database- Returns:
- a new
MongoDbConnector
-
GridFs
Pseudo-constructor method which creates a newMongoDbConnector
for GridFS.- Parameters:
database
- connection to the MongoDB database- Returns:
- a new
MongoDbConnector
-
GridFsCaching
Pseudo-constructor method which creates a newMongoDbConnector
for GridFS with cache.- Parameters:
database
- connection to the MongoDB database- Returns:
- a new
MongoDbConnector
-