Class CollectionShardedMongoDatabase

  • All Implemented Interfaces:
    com.mongodb.client.MongoDatabase

    public class CollectionShardedMongoDatabase
    extends Object
    implements com.mongodb.client.MongoDatabase
    CollectionShardedMongoDatabase to query for collections that are sharded within a single database.
    Author:
    Shashank Sharma
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.mongodb.client.AggregateIterable<org.bson.Document> aggregate​(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> list)  
      <T> com.mongodb.client.AggregateIterable<T> aggregate​(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> list, Class<T> aClass)  
      com.mongodb.client.AggregateIterable<org.bson.Document> aggregate​(List<? extends org.bson.conversions.Bson> list)  
      <T> com.mongodb.client.AggregateIterable<T> aggregate​(List<? extends org.bson.conversions.Bson> list, Class<T> aClass)  
      void createCollection​(com.mongodb.client.ClientSession clientSession, String s)  
      void createCollection​(com.mongodb.client.ClientSession clientSession, String s, com.mongodb.client.model.CreateCollectionOptions createCollectionOptions)  
      void createCollection​(String s)  
      void createCollection​(String s, com.mongodb.client.model.CreateCollectionOptions createCollectionOptions)  
      void createView​(com.mongodb.client.ClientSession clientSession, String s, String s1, List<? extends org.bson.conversions.Bson> list)  
      void createView​(com.mongodb.client.ClientSession clientSession, String s, String s1, List<? extends org.bson.conversions.Bson> list, com.mongodb.client.model.CreateViewOptions createViewOptions)  
      void createView​(String s, String s1, List<? extends org.bson.conversions.Bson> list)  
      void createView​(String s, String s1, List<? extends org.bson.conversions.Bson> list, com.mongodb.client.model.CreateViewOptions createViewOptions)  
      void drop()  
      void drop​(com.mongodb.client.ClientSession clientSession)  
      org.bson.codecs.configuration.CodecRegistry getCodecRegistry()  
      com.mongodb.client.MongoCollection<org.bson.Document> getCollection​(String s)  
      <T> com.mongodb.client.MongoCollection<T> getCollection​(String s, Class<T> aClass)  
      String getName()  
      com.mongodb.ReadConcern getReadConcern()  
      com.mongodb.ReadPreference getReadPreference()  
      com.mongodb.WriteConcern getWriteConcern()  
      com.mongodb.client.MongoIterable<String> listCollectionNames()  
      com.mongodb.client.MongoIterable<String> listCollectionNames​(com.mongodb.client.ClientSession clientSession)  
      com.mongodb.client.ListCollectionsIterable<org.bson.Document> listCollections()  
      com.mongodb.client.ListCollectionsIterable<org.bson.Document> listCollections​(com.mongodb.client.ClientSession clientSession)  
      <T> com.mongodb.client.ListCollectionsIterable<T> listCollections​(com.mongodb.client.ClientSession clientSession, Class<T> aClass)  
      <T> com.mongodb.client.ListCollectionsIterable<T> listCollections​(Class<T> aClass)  
      org.bson.Document runCommand​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson bson)  
      org.bson.Document runCommand​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson bson, com.mongodb.ReadPreference readPreference)  
      <T> T runCommand​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson bson, com.mongodb.ReadPreference readPreference, Class<T> aClass)  
      <T> T runCommand​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson bson, Class<T> aClass)  
      org.bson.Document runCommand​(org.bson.conversions.Bson bson)  
      org.bson.Document runCommand​(org.bson.conversions.Bson bson, com.mongodb.ReadPreference readPreference)  
      <T> T runCommand​(org.bson.conversions.Bson bson, com.mongodb.ReadPreference readPreference, Class<T> aClass)  
      <T> T runCommand​(org.bson.conversions.Bson bson, Class<T> aClass)  
      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)  
      com.mongodb.client.MongoDatabase withCodecRegistry​(org.bson.codecs.configuration.CodecRegistry codecRegistry)  
      com.mongodb.client.MongoDatabase withReadConcern​(com.mongodb.ReadConcern readConcern)  
      com.mongodb.client.MongoDatabase withReadPreference​(com.mongodb.ReadPreference readPreference)  
      com.mongodb.client.MongoDatabase withWriteConcern​(com.mongodb.WriteConcern writeConcern)  
    • Constructor Detail

      • CollectionShardedMongoDatabase

        public CollectionShardedMongoDatabase​(com.mongodb.client.MongoDatabase delegatedMongoDatabase,
                                              CollectionShardingOptions shardingOptions)
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface com.mongodb.client.MongoDatabase
      • getCodecRegistry

        public org.bson.codecs.configuration.CodecRegistry getCodecRegistry()
        Specified by:
        getCodecRegistry in interface com.mongodb.client.MongoDatabase
      • getReadPreference

        public com.mongodb.ReadPreference getReadPreference()
        Specified by:
        getReadPreference in interface com.mongodb.client.MongoDatabase
      • getWriteConcern

        public com.mongodb.WriteConcern getWriteConcern()
        Specified by:
        getWriteConcern in interface com.mongodb.client.MongoDatabase
      • getReadConcern

        public com.mongodb.ReadConcern getReadConcern()
        Specified by:
        getReadConcern in interface com.mongodb.client.MongoDatabase
      • withCodecRegistry

        public com.mongodb.client.MongoDatabase withCodecRegistry​(org.bson.codecs.configuration.CodecRegistry codecRegistry)
        Specified by:
        withCodecRegistry in interface com.mongodb.client.MongoDatabase
      • withReadPreference

        public com.mongodb.client.MongoDatabase withReadPreference​(com.mongodb.ReadPreference readPreference)
        Specified by:
        withReadPreference in interface com.mongodb.client.MongoDatabase
      • withWriteConcern

        public com.mongodb.client.MongoDatabase withWriteConcern​(com.mongodb.WriteConcern writeConcern)
        Specified by:
        withWriteConcern in interface com.mongodb.client.MongoDatabase
      • withReadConcern

        public com.mongodb.client.MongoDatabase withReadConcern​(com.mongodb.ReadConcern readConcern)
        Specified by:
        withReadConcern in interface com.mongodb.client.MongoDatabase
      • getCollection

        public com.mongodb.client.MongoCollection<org.bson.Document> getCollection​(String s)
        Specified by:
        getCollection in interface com.mongodb.client.MongoDatabase
      • getCollection

        public <T> com.mongodb.client.MongoCollection<T> getCollection​(String s,
                                                                       Class<T> aClass)
        Specified by:
        getCollection in interface com.mongodb.client.MongoDatabase
      • runCommand

        public org.bson.Document runCommand​(org.bson.conversions.Bson bson)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • runCommand

        public org.bson.Document runCommand​(org.bson.conversions.Bson bson,
                                            com.mongodb.ReadPreference readPreference)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • runCommand

        public <T> T runCommand​(org.bson.conversions.Bson bson,
                                Class<T> aClass)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • runCommand

        public <T> T runCommand​(org.bson.conversions.Bson bson,
                                com.mongodb.ReadPreference readPreference,
                                Class<T> aClass)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • runCommand

        public org.bson.Document runCommand​(com.mongodb.client.ClientSession clientSession,
                                            org.bson.conversions.Bson bson)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • runCommand

        public org.bson.Document runCommand​(com.mongodb.client.ClientSession clientSession,
                                            org.bson.conversions.Bson bson,
                                            com.mongodb.ReadPreference readPreference)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • runCommand

        public <T> T runCommand​(com.mongodb.client.ClientSession clientSession,
                                org.bson.conversions.Bson bson,
                                Class<T> aClass)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • runCommand

        public <T> T runCommand​(com.mongodb.client.ClientSession clientSession,
                                org.bson.conversions.Bson bson,
                                com.mongodb.ReadPreference readPreference,
                                Class<T> aClass)
        Specified by:
        runCommand in interface com.mongodb.client.MongoDatabase
      • drop

        public void drop()
        Specified by:
        drop in interface com.mongodb.client.MongoDatabase
      • drop

        public void drop​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        drop in interface com.mongodb.client.MongoDatabase
      • listCollectionNames

        public com.mongodb.client.MongoIterable<String> listCollectionNames()
        Specified by:
        listCollectionNames in interface com.mongodb.client.MongoDatabase
      • listCollections

        public com.mongodb.client.ListCollectionsIterable<org.bson.Document> listCollections()
        Specified by:
        listCollections in interface com.mongodb.client.MongoDatabase
      • listCollections

        public <T> com.mongodb.client.ListCollectionsIterable<T> listCollections​(Class<T> aClass)
        Specified by:
        listCollections in interface com.mongodb.client.MongoDatabase
      • listCollectionNames

        public com.mongodb.client.MongoIterable<String> listCollectionNames​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        listCollectionNames in interface com.mongodb.client.MongoDatabase
      • listCollections

        public com.mongodb.client.ListCollectionsIterable<org.bson.Document> listCollections​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        listCollections in interface com.mongodb.client.MongoDatabase
      • listCollections

        public <T> com.mongodb.client.ListCollectionsIterable<T> listCollections​(com.mongodb.client.ClientSession clientSession,
                                                                                 Class<T> aClass)
        Specified by:
        listCollections in interface com.mongodb.client.MongoDatabase
      • createCollection

        public void createCollection​(String s)
        Specified by:
        createCollection in interface com.mongodb.client.MongoDatabase
      • createCollection

        public void createCollection​(String s,
                                     com.mongodb.client.model.CreateCollectionOptions createCollectionOptions)
        Specified by:
        createCollection in interface com.mongodb.client.MongoDatabase
      • createCollection

        public void createCollection​(com.mongodb.client.ClientSession clientSession,
                                     String s)
        Specified by:
        createCollection in interface com.mongodb.client.MongoDatabase
      • createCollection

        public void createCollection​(com.mongodb.client.ClientSession clientSession,
                                     String s,
                                     com.mongodb.client.model.CreateCollectionOptions createCollectionOptions)
        Specified by:
        createCollection in interface com.mongodb.client.MongoDatabase
      • createView

        public void createView​(String s,
                               String s1,
                               List<? extends org.bson.conversions.Bson> list)
        Specified by:
        createView in interface com.mongodb.client.MongoDatabase
      • createView

        public void createView​(String s,
                               String s1,
                               List<? extends org.bson.conversions.Bson> list,
                               com.mongodb.client.model.CreateViewOptions createViewOptions)
        Specified by:
        createView in interface com.mongodb.client.MongoDatabase
      • createView

        public void createView​(com.mongodb.client.ClientSession clientSession,
                               String s,
                               String s1,
                               List<? extends org.bson.conversions.Bson> list)
        Specified by:
        createView in interface com.mongodb.client.MongoDatabase
      • createView

        public void createView​(com.mongodb.client.ClientSession clientSession,
                               String s,
                               String s1,
                               List<? extends org.bson.conversions.Bson> list,
                               com.mongodb.client.model.CreateViewOptions createViewOptions)
        Specified by:
        createView in interface com.mongodb.client.MongoDatabase
      • watch

        public com.mongodb.client.ChangeStreamIterable<org.bson.Document> watch()
        Specified by:
        watch in interface com.mongodb.client.MongoDatabase
      • watch

        public <T> com.mongodb.client.ChangeStreamIterable<T> watch​(Class<T> aClass)
        Specified by:
        watch in interface com.mongodb.client.MongoDatabase
      • watch

        public com.mongodb.client.ChangeStreamIterable<org.bson.Document> watch​(List<? extends org.bson.conversions.Bson> list)
        Specified by:
        watch in interface com.mongodb.client.MongoDatabase
      • watch

        public <T> com.mongodb.client.ChangeStreamIterable<T> watch​(List<? extends org.bson.conversions.Bson> list,
                                                                    Class<T> aClass)
        Specified by:
        watch in interface com.mongodb.client.MongoDatabase
      • watch

        public com.mongodb.client.ChangeStreamIterable<org.bson.Document> watch​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        watch in interface com.mongodb.client.MongoDatabase
      • watch

        public <T> com.mongodb.client.ChangeStreamIterable<T> watch​(com.mongodb.client.ClientSession clientSession,
                                                                    Class<T> aClass)
        Specified by:
        watch in interface com.mongodb.client.MongoDatabase
      • 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 interface com.mongodb.client.MongoDatabase
      • 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 interface com.mongodb.client.MongoDatabase
      • aggregate

        public com.mongodb.client.AggregateIterable<org.bson.Document> aggregate​(List<? extends org.bson.conversions.Bson> list)
        Specified by:
        aggregate in interface com.mongodb.client.MongoDatabase
      • aggregate

        public <T> com.mongodb.client.AggregateIterable<T> aggregate​(List<? extends org.bson.conversions.Bson> list,
                                                                     Class<T> aClass)
        Specified by:
        aggregate in interface com.mongodb.client.MongoDatabase
      • aggregate

        public com.mongodb.client.AggregateIterable<org.bson.Document> aggregate​(com.mongodb.client.ClientSession clientSession,
                                                                                 List<? extends org.bson.conversions.Bson> list)
        Specified by:
        aggregate in interface com.mongodb.client.MongoDatabase
      • aggregate

        public <T> com.mongodb.client.AggregateIterable<T> aggregate​(com.mongodb.client.ClientSession clientSession,
                                                                     List<? extends org.bson.conversions.Bson> list,
                                                                     Class<T> aClass)
        Specified by:
        aggregate in interface com.mongodb.client.MongoDatabase