Interface StoreProvider


public interface StoreProvider
Opens stores of one type (06-stores.md ยง1); found through ServiceLoader or given to the runtime (as a Spring bean, say), both along the same path. Replaces 4.x CosIdStoreProvider.
  • Method Summary

    Modifier and Type
    Method
    Description
    open(StoreConfig config)
    Opens a store.
    default Set<String>
    The option keys this provider reads from StoreConfig.options(), spelled as it reads them (R1-spi-01).
    The type this provider opens.
  • Method Details

    • type

      String type()
      The type this provider opens.
      Returns:
      "jdbc", "redis", "mongo", "zookeeper", "remote" or your own
    • options

      default Set<String> options()
      The option keys this provider reads from StoreConfig.options(), spelled as it reads them (R1-spi-01). The runtime matches each configured key to one of these ignoring case, - and _, as Spring's relaxed binding does (init-schema, INITSCHEMA and initSchema are one key; . still separates), passes it on under this spelling, and fails the start on any other key, listing these.
      Returns:
      the option keys; default none, so a provider that reads options declares them
    • open

      Store open(StoreConfig config)
      Opens a store.
      Parameters:
      config - the store, its options under the spelling of options()
      Returns:
      the store, never null (the runtime refuses a null at start); the runtime closes it
      Throws:
      IllegalArgumentException - if an option or the client does not fit this store (R1-core-16)