Interface MongoConnector

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    ExternalMongoConnector, InternalMongoConnector

    public interface MongoConnector
    extends java.io.Closeable
    Interface through which quartz-mongodb interacts with MongoDB.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Quartz-mongodb will call this method when shutting down.
      com.mongodb.client.MongoCollection<org.bson.Document> getCollection​(java.lang.String collectionName)
      Quartz-mongodb will call this method to get the instance of MongoCollection for internal uses.
    • Method Detail

      • getCollection

        com.mongodb.client.MongoCollection<org.bson.Document> getCollection​(java.lang.String collectionName)
        Quartz-mongodb will call this method to get the instance of MongoCollection for internal uses. The collection is expected to be fully configured with correct WriteConcern.
        Parameters:
        collectionName - collection name.
        Returns:
        instance of MongoCollection.
      • close

        void close()
        Quartz-mongodb will call this method when shutting down. Implementation can close MongoClient here.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable