Package step.core.collections.mongodb
Class MongoClientSession
- java.lang.Object
-
- step.core.collections.mongodb.MongoClientSession
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MongoClientSession extends Object implements Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected IntegerbatchSizeprotected Stringdbprotected com.mongodb.client.MongoClientmongoClient
-
Constructor Summary
Constructors Constructor Description MongoClientSession(Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()IntegergetBatchSize()<T> step.core.collections.Collection<T>getEntityCollection(String name, Class<T> entityClass)com.mongodb.client.MongoClientgetMongoClient()com.mongodb.client.MongoDatabasegetMongoDatabase()
-
-
-
Constructor Detail
-
MongoClientSession
public MongoClientSession(Properties properties)
-
-
Method Detail
-
getMongoDatabase
public com.mongodb.client.MongoDatabase getMongoDatabase()
-
getMongoClient
public com.mongodb.client.MongoClient getMongoClient()
-
getEntityCollection
public <T> step.core.collections.Collection<T> getEntityCollection(String name, Class<T> entityClass)
-
getBatchSize
public Integer getBatchSize()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-