@ApplicationScoped public class SourceOrderArbiter extends Arbiter
Arbiter
implementation that performs arbitration
among Value
s by selecting the Value
whose
affiliated Source
appears first in the Set
of Source
s supplied to the
arbitrate(Set, String, Set, Collection)
method.arbitrate(Set, String, Set, Collection)
,
Arbiter
,
Serialized FormConstructor and Description |
---|
SourceOrderArbiter()
Creates a new
SourceOrderArbiter . |
Modifier and Type | Method and Description |
---|---|
Value |
arbitrate(Set<? extends Source> sources,
String name,
Set<? extends Annotation> qualifiers,
Collection<? extends Value> values)
Performs value arbitration by considering
Value s'
affiliated Source s
such that the Value whose Source appears earliest in the supplied sources Set will be selected. |
public SourceOrderArbiter()
SourceOrderArbiter
.public Value arbitrate(Set<? extends Source> sources, String name, Set<? extends Annotation> qualifiers, Collection<? extends Value> values)
Value
s'
affiliated Source
s
such that the Value
whose Source
appears earliest in the supplied sources
Set
will be selected.arbitrate
in class Arbiter
sources
- the Set
of Source
s in effect
during the current value acquisition operation; must not be
null
; must be unmodifiable; must be safe for
concurrent read-only access by multiple threadsname
- the name of the setting value being sought; must not
be null
qualifiers
- the Set
of qualifier Annotation
s in effect during the current value acquisition
operation; must not be null
; must be unmodifiable; must be safe for
concurrent read-only access by multiple threadsvalues
- the Collection
of Value
s acquired
during the current value acquisition operation that were deemed
to be indistinguishable; must not be null
; must be
unmodifiable; must
be safe for concurrent read-only access by multiple threadsValue
, or null
if this SourceOrderArbiter
could
not select a single Value
NullPointerException
- if any parameter value is null
ArbitrationException
- if there was a procedural problem
with arbitrationCopyright © 2019–2020, microBean™. All rights reserved.