public interface Arbiter
ConfigurationValues.arbitrate(Map, String, Collection)| Modifier and Type | Method and Description |
|---|---|
ConfigurationValue |
arbitrate(Map<? extends String,? extends String> requestedCoordinates,
String name,
Collection<? extends ConfigurationValue> ambiguousValues)
Given a logical request for a configuration value, represented by
the
callerCoordinates and name parameter values,
and a Collection of ConfigurationValue instances
that represents the ambiguous response from several Configuration instances, attempts to resolve the ambiguity by
returning a single ConfigurationValue instead. |
ConfigurationValue arbitrate(Map<? extends String,? extends String> requestedCoordinates, String name, Collection<? extends ConfigurationValue> ambiguousValues)
callerCoordinates and name parameter values,
and a Collection of ConfigurationValue instances
that represents the ambiguous response from several Configuration instances, attempts to resolve the ambiguity by
returning a single ConfigurationValue instead.
Implementations of this method may return null.
A special case is when the supplied ambiguousValues
parameter is null or empty. This means, effectively, that all consulted Configuration instances returned null from their Configuration.getValue(Map, String) methods. An Arbiter
encountering this state of affairs and returning a single
non-null ConfigurationValue is effectively
synthesizing a default value.
requestedCoordinates - the (immutable) configuration
coordinates in effect for the request; may be nullname - the name of the configuration value; must not be
nullambiguousValues - an immutable Collection of definitionally ambiguous ConfigurationValues that resulted from the request; may be
nullnull if the dispute
cannot be arbitrated by this ArbiterNullPointerException - if name is nullAmbiguousConfigurationValuesException - if overall
arbitration is to be cut short by this Arbiter—normally an Arbiter should simply return
nullCopyright © 2017–2019, microBean. All rights reserved.