Class MongoStoreProvider

java.lang.Object
me.ahoo.cosid.store.mongo.MongoStoreProvider
All Implemented Interfaces:
me.ahoo.cosid.store.StoreProvider

public final class MongoStoreProvider extends Object implements me.ahoo.cosid.store.StoreProvider
Opens MongoStores, type mongo (06-stores.md ยง1); registered for ServiceLoader.

Options: database, the database name ("cosid_db" by default); uri, the connection string, required unless StoreConfig.client() holds a MongoClient. An injected client stays open when the store closes; one built from uri is closed with it; writeConcern, the write concern (majority by default, see writeConcern(String, Object)). StoreConfig.timeout() becomes the driver's operation timeout (timeoutMS).

  • Field Details

  • Constructor Details

    • MongoStoreProvider

      public MongoStoreProvider()
  • Method Details

    • type

      public String type()
      Specified by:
      type in interface me.ahoo.cosid.store.StoreProvider
    • options

      public Set<String> options()
      Specified by:
      options in interface me.ahoo.cosid.store.StoreProvider
    • open

      public me.ahoo.cosid.store.Store open(me.ahoo.cosid.store.StoreConfig config)
      Specified by:
      open in interface me.ahoo.cosid.store.StoreProvider