java.lang.Object
me.ahoo.cosid.store.StoreOptions
The options of a store matched to the keys its provider declares (R1-spi-01, R1-spring-01): case,
- and
_ do not count, so an environment variable (..._OPTIONS_INITSCHEMA) and kebab-case
(init-schema) reach initSchema; any other key is a problem. The runtime applies it to every store
it opens; code that opens a store itself applies it too.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringA key as it is compared: lower case, without-and_.resolve(String store, String type, Set<String> known, Map<String, Object> options, List<String> problems) The options under the provider's spelling, the problems collected for one message with others: what the runtime checks every store with.The options under the provider's spelling, or an error naming every unknown or repeated key.
-
Method Details
-
canonical
A key as it is compared: lower case, without-and_.- Parameters:
key- the key- Returns:
- the compared form
-
resolve
public static Map<String,Object> resolve(String store, StoreProvider provider, Map<String, Object> options) The options under the provider's spelling, or an error naming every unknown or repeated key.- Parameters:
store- the store name, for the errorprovider- the provider that opens the storeoptions- the configured options- Returns:
- the options keyed as
StoreProvider.options()spells them - Throws:
IllegalArgumentException- if a key matches no declared option, or two keys match one
-
resolve
public static Map<String,Object> resolve(String store, String type, Set<String> known, Map<String, Object> options, List<String> problems) The options under the provider's spelling, the problems collected for one message with others: what the runtime checks every store with. It keeps its signature (R2-core-03); a new parameter comes through a new method.- Parameters:
store- the store name, for the problemstype- the store typeknown- the keys the provider declaresoptions- the configured optionsproblems- where an unknown or repeated key goes- Returns:
- the options keyed by the declared spelling
-