Class AlgorithmExecutionCapabilities
java.lang.Object
zeroecho.core.spi.AlgorithmExecutionCapabilities
Immutable deterministic snapshot of installed execution capabilities.
Multiple implementations may support one semantic identity. Callers must select an implementation explicitly when more than one remains after policy; classpath or provider order never supplies precedence.
-
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmExecutionCapabilities(List<AlgorithmExecutionCapability> capabilities) Creates a validated immutable snapshot. -
Method Summary
Modifier and TypeMethodDescriptionall()Returns the immutable installed snapshot.fromProviders(Collection<? extends AlgorithmExecutionCapabilityProvider> providers) Builds one deterministic snapshot from already selected trusted providers.Discovers installed providers using the existing ServiceLoader convention.supporting(AlgorithmIdentity identity, AlgorithmSuite suite, AlgorithmExecutionCapability.Direction direction) Finds all installed implementations supporting an exact tuple.
-
Constructor Details
-
AlgorithmExecutionCapabilities
Creates a validated immutable snapshot.- Parameters:
capabilities- installed trusted-code capabilities- Throws:
IllegalArgumentException- if implementation identifiers collide or a fingerprint is blank
-
-
Method Details
-
installed
Discovers installed providers using the existing ServiceLoader convention.- Returns:
- deterministic immutable capability snapshot
-
fromProviders
public static AlgorithmExecutionCapabilities fromProviders(Collection<? extends AlgorithmExecutionCapabilityProvider> providers) Builds one deterministic snapshot from already selected trusted providers.- Parameters:
providers- provider instances belonging to the runtime graph- Returns:
- immutable capability snapshot
-
supporting
public List<AlgorithmExecutionCapability> supporting(AlgorithmIdentity identity, AlgorithmSuite suite, AlgorithmExecutionCapability.Direction direction) Finds all installed implementations supporting an exact tuple.- Parameters:
identity- exact operation identitysuite- complete suitedirection- operation direction- Returns:
- deterministic immutable matching list
-
all
Returns the immutable installed snapshot.- Returns:
- capabilities sorted by implementation identifier
-