Class SelectorResolver.Resolution

  • Enclosing interface:
    SelectorResolver

    @API(status=STABLE,
         since="1.10")
    public static class SelectorResolver.Resolution
    extends java.lang.Object
    The result of an attempt to resolve a DiscoverySelector.

    A resolution is either unresolved, contains a match or multiple matches, or a set of selectors.

    Since:
    1.5
    See Also:
    SelectorResolver
    • Method Detail

      • unresolved

        public static SelectorResolver.Resolution unresolved()
        Factory for creating unresolved resolutions.
        Returns:
        an unresolved resolution; never null
      • match

        public static SelectorResolver.Resolution match​(SelectorResolver.Match match)
        Factory for creating a resolution that contains the supplied Match.
        Parameters:
        match - the resolved Match; never null
        Returns:
        a resolution that contains the supplied Match; never null
      • matches

        public static SelectorResolver.Resolution matches​(java.util.Set<SelectorResolver.Match> matches)
        Factory for creating a resolution that contains the supplied Matches.
        Parameters:
        matches - the resolved Matches; never null or empty
        Returns:
        a resolution that contains the supplied Matches; never null
      • selectors

        public static SelectorResolver.Resolution selectors​(java.util.Set<? extends DiscoverySelector> selectors)
        Factory for creating a resolution that contains the supplied DiscoverySelectors.
        Parameters:
        selectors - the resolved DiscoverySelectors; never null or empty
        Returns:
        a resolution that contains the supplied DiscoverySelectors; never null
      • isResolved

        public boolean isResolved()
        Whether this resolution contains matches or selectors.
        Returns:
        true if this resolution contains matches or selectors
      • getMatches

        public java.util.Set<SelectorResolver.Match> getMatches()
        Returns the matches contained by this resolution.
        Returns:
        the set of matches; never null but potentially empty
      • getSelectors

        public java.util.Set<? extends DiscoverySelector> getSelectors()
        Returns the selectors contained by this resolution.
        Returns:
        the set of selectors; never null but potentially empty