Class DatabaseShardedMongoClient
- java.lang.Object
-
- com.alpha.mongodb.sharding.core.client.DatabaseShardedMongoClient
-
- All Implemented Interfaces:
ShardedMongoClient
,com.mongodb.client.MongoClient
,Closeable
,AutoCloseable
- Direct Known Subclasses:
CompositeShardedMongoClient
public class DatabaseShardedMongoClient extends Object implements ShardedMongoClient
Database Sharded Mongo Client to get the databases which are sharded by database.- Author:
- Shashank Sharma
-
-
Constructor Summary
Constructors Constructor Description DatabaseShardedMongoClient(com.mongodb.client.MongoClient delegatedMongoClient, DatabaseShardingOptions shardingOptions)
DatabaseShardedMongoClient(Map<String,com.mongodb.client.MongoClient> delegatedMongoClientMap, DatabaseShardingOptions shardingOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
com.mongodb.connection.ClusterDescription
getClusterDescription()
com.mongodb.client.MongoDatabase
getDatabase(String s)
com.mongodb.client.MongoIterable<String>
listDatabaseNames()
com.mongodb.client.MongoIterable<String>
listDatabaseNames(com.mongodb.client.ClientSession clientSession)
com.mongodb.client.ListDatabasesIterable<org.bson.Document>
listDatabases()
com.mongodb.client.ListDatabasesIterable<org.bson.Document>
listDatabases(com.mongodb.client.ClientSession clientSession)
<T> com.mongodb.client.ListDatabasesIterable<T>
listDatabases(com.mongodb.client.ClientSession clientSession, Class<T> aClass)
<T> com.mongodb.client.ListDatabasesIterable<T>
listDatabases(Class<T> aClass)
com.mongodb.client.ClientSession
startSession()
com.mongodb.client.ClientSession
startSession(com.mongodb.ClientSessionOptions clientSessionOptions)
com.mongodb.client.ChangeStreamIterable<org.bson.Document>
watch()
com.mongodb.client.ChangeStreamIterable<org.bson.Document>
watch(com.mongodb.client.ClientSession clientSession)
<T> com.mongodb.client.ChangeStreamIterable<T>
watch(com.mongodb.client.ClientSession clientSession, Class<T> aClass)
com.mongodb.client.ChangeStreamIterable<org.bson.Document>
watch(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> list)
<T> com.mongodb.client.ChangeStreamIterable<T>
watch(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> list, Class<T> aClass)
<T> com.mongodb.client.ChangeStreamIterable<T>
watch(Class<T> aClass)
com.mongodb.client.ChangeStreamIterable<org.bson.Document>
watch(List<? extends org.bson.conversions.Bson> list)
<T> com.mongodb.client.ChangeStreamIterable<T>
watch(List<? extends org.bson.conversions.Bson> list, Class<T> aClass)
-
-
-
Constructor Detail
-
DatabaseShardedMongoClient
public DatabaseShardedMongoClient(Map<String,com.mongodb.client.MongoClient> delegatedMongoClientMap, DatabaseShardingOptions shardingOptions)
-
DatabaseShardedMongoClient
public DatabaseShardedMongoClient(com.mongodb.client.MongoClient delegatedMongoClient, DatabaseShardingOptions shardingOptions)
-
-
Method Detail
-
getDatabase
public com.mongodb.client.MongoDatabase getDatabase(String s)
- Specified by:
getDatabase
in interfacecom.mongodb.client.MongoClient
-
startSession
public com.mongodb.client.ClientSession startSession()
- Specified by:
startSession
in interfacecom.mongodb.client.MongoClient
-
startSession
public com.mongodb.client.ClientSession startSession(com.mongodb.ClientSessionOptions clientSessionOptions)
- Specified by:
startSession
in interfacecom.mongodb.client.MongoClient
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacecom.mongodb.client.MongoClient
-
listDatabaseNames
public com.mongodb.client.MongoIterable<String> listDatabaseNames()
- Specified by:
listDatabaseNames
in interfacecom.mongodb.client.MongoClient
-
listDatabaseNames
public com.mongodb.client.MongoIterable<String> listDatabaseNames(com.mongodb.client.ClientSession clientSession)
- Specified by:
listDatabaseNames
in interfacecom.mongodb.client.MongoClient
-
listDatabases
public com.mongodb.client.ListDatabasesIterable<org.bson.Document> listDatabases()
- Specified by:
listDatabases
in interfacecom.mongodb.client.MongoClient
-
listDatabases
public com.mongodb.client.ListDatabasesIterable<org.bson.Document> listDatabases(com.mongodb.client.ClientSession clientSession)
- Specified by:
listDatabases
in interfacecom.mongodb.client.MongoClient
-
listDatabases
public <T> com.mongodb.client.ListDatabasesIterable<T> listDatabases(Class<T> aClass)
- Specified by:
listDatabases
in interfacecom.mongodb.client.MongoClient
-
listDatabases
public <T> com.mongodb.client.ListDatabasesIterable<T> listDatabases(com.mongodb.client.ClientSession clientSession, Class<T> aClass)
- Specified by:
listDatabases
in interfacecom.mongodb.client.MongoClient
-
watch
public com.mongodb.client.ChangeStreamIterable<org.bson.Document> watch()
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
watch
public <T> com.mongodb.client.ChangeStreamIterable<T> watch(Class<T> aClass)
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
watch
public com.mongodb.client.ChangeStreamIterable<org.bson.Document> watch(List<? extends org.bson.conversions.Bson> list)
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
watch
public <T> com.mongodb.client.ChangeStreamIterable<T> watch(List<? extends org.bson.conversions.Bson> list, Class<T> aClass)
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
watch
public com.mongodb.client.ChangeStreamIterable<org.bson.Document> watch(com.mongodb.client.ClientSession clientSession)
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
watch
public <T> com.mongodb.client.ChangeStreamIterable<T> watch(com.mongodb.client.ClientSession clientSession, Class<T> aClass)
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
watch
public com.mongodb.client.ChangeStreamIterable<org.bson.Document> watch(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> list)
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
watch
public <T> com.mongodb.client.ChangeStreamIterable<T> watch(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> list, Class<T> aClass)
- Specified by:
watch
in interfacecom.mongodb.client.MongoClient
-
getClusterDescription
public com.mongodb.connection.ClusterDescription getClusterDescription()
- Specified by:
getClusterDescription
in interfacecom.mongodb.client.MongoClient
-
-