Interface ExternalPatternSink
- All Known Subinterfaces:
PatternProvider
@API(status=STABLE,
since="2.0.0-milestone.4.12")
public interface ExternalPatternSink
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaccept(Pattern pattern, Collection<ResourceAmount> resources, Action action) Accepts the given resources into the external target.default ExternalPatternSinkKeygetKey()
-
Method Details
-
accept
ExternalPatternSink.Result accept(Pattern pattern, Collection<ResourceAmount> resources, Action action) Accepts the given resources into the external target. All resources MUST be able to be inserted for this method to returnExternalPatternSink.Result.ACCEPTED, otherwise, it must returnExternalPatternSink.Result.REJECTED. If the sink is locked, it must returnExternalPatternSink.Result.LOCKED. If the resources are not applicable for this sink, it must returnExternalPatternSink.Result.SKIPPED.- Parameters:
pattern- the patternresources- the resourcesaction- the action- Returns:
- the result
-
getKey
- Returns:
- the key for this sink
-