Class MongodbQueueFactory<T extends MongodbQueue<ID,​DATA>,​ID,​DATA>

    • Constructor Detail

      • MongodbQueueFactory

        public MongodbQueueFactory()
    • Method Detail

      • getDefaultConnectionString

        public String getDefaultConnectionString()
        Default MongoDB's connection string (see http://mongodb.github.io/mongo-java-driver/3.10/driver/getting-started/quick-start/), passed to all queues created by this factory.
        Returns:
      • setDefaultConnectionString

        public MongodbQueueFactory<T,​ID,​DATA> setDefaultConnectionString​(String defaultConnectionString)
        Default MongoDB's connection string (see http://mongodb.github.io/mongo-java-driver/3.10/driver/getting-started/quick-start/), passed to all queues created by this factory.
        Parameters:
        defaultConnectionString -
        Returns:
      • getDefaultDatabaseName

        public String getDefaultDatabaseName()
        Default name of MongoDB database to store data, passed to all queues created by this factory.
        Returns:
      • setDefaultDatabaseName

        public MongodbQueueFactory<T,​ID,​DATA> setDefaultDatabaseName​(String defaultDatabaseName)
        Default name of MongoDB database to store data, passed to all queues created by this factory.
        Parameters:
        defaultDatabaseName -
        Returns:
      • getDefaultCollectionName

        public String getDefaultCollectionName()
        Default name of MongoDB collection to store queue messages, passed to all queues created by this factory.
        Returns:
      • setDefaultCollectionName

        public MongodbQueueFactory<T,​ID,​DATA> setDefaultCollectionName​(String defaultCollectionName)
        Default name of MongoDB collection to store queue messages, passed to all queues created by this factory.
        Parameters:
        defaultCollectionName -
        Returns:
      • getDefaultMongoClient

        protected com.mongodb.client.MongoClient getDefaultMongoClient()
        If all MongodbQueue instances are connecting to one MongoDB server or cluster, it's a good idea to pre-create a MongoClient instance and share it amongst MongodbQueue instances created from this factory by assigning it to defaultMongoClient (see setDefaultMongoClient(MongoClient)).
        Returns:
      • setDefaultMongoClient

        protected MongodbQueueFactory<T,​ID,​DATA> setDefaultMongoClient​(com.mongodb.client.MongoClient mongoClient,
                                                                                   boolean setMyOwnMongoClient)
        If all MongodbQueue instances are connecting to one MongoDB server or cluster, it's a good idea to pre-create a MongoClient instance and share it amongst MongodbQueue instances created from this factory by assigning it to defaultMongoClient (see setDefaultMongoClient(MongoClient)).
        Parameters:
        mongoClient -
        setMyOwnMongoClient -
        Returns: