Class MongoDBImpl

java.lang.Object
org.apache.tapestry5.internal.mongodb.MongoDBImpl
All Implemented Interfaces:
EventListener, ThreadCleanupListener, MongoDB

public class MongoDBImpl extends Object implements MongoDB, ThreadCleanupListener
Default implementation for MongoDB
  • Constructor Details

  • Method Details

    • getDefaultMongoDb

      public com.mongodb.DB getDefaultMongoDb()
      Description copied from interface: MongoDB
      Obtain a shared instance of the MongoDB database connection object connected to the default database
      Specified by:
      getDefaultMongoDb in interface MongoDB
      Returns:
      the DB connection object
    • getMongoDb

      public com.mongodb.DB getMongoDb(String dbname)
      Description copied from interface: MongoDB
      Obtain a shared instance of the MongoDB database connection object for the specific database
      Specified by:
      getMongoDb in interface MongoDB
      Parameters:
      dbname - the database name to connect to
      Returns:
      the DB connection object
    • threadDidCleanup

      public void threadDidCleanup()
      Description copied from interface: ThreadCleanupListener
      Invoked by PerthreadManager service when a thread performs and end-of-request cleanup.
      Specified by:
      threadDidCleanup in interface ThreadCleanupListener