Package com.tick42.glue.core.interop.discovery

# Class ServerSearch

java.lang.Object
com.tick42.glue.core.interop.discovery.ServerSearch

All Implemented Interfaces:
  `AsynchronousCloseable`, `Search<Instance>`, `AutoCloseable`

    public final class ServerSearch
    extends Object
    implements Search<Instance>

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `CompletionStage<Collection<Instance>>` | `all()` | Retrieves all elements matching the search criteria.
  `CompletionStage<Instance>` | `any()` | Retrieves any one of the elements from a set matching the search criteria.
  `CompletionStage<Void>` | `closeAsync()` | Initiates a shutdown.
  `CompletionStage<Void>` | `onClose()` | Return a stage that will complete when `AsynchronousCloseable.closeAsync()` is called and shutdown completes.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.tick42.glue.core.AsynchronousCloseable

  `close`

  ### Methods inherited from interface com.tick42.glue.core.interop.discovery.Search

  `all, any`

- ## Method Details

  - ### onClose

    public CompletionStage<Void> onClose()
    Description copied from interface: `AsynchronousCloseable`
    Return a stage that will complete when `AsynchronousCloseable.closeAsync()` is called and shutdown completes.
    Specified by:
      `onClose` in interface `AsynchronousCloseable`
    Returns:
      a stage that will complete when shutdown is complete, never `null`

  - ### closeAsync

    public CompletionStage<Void> closeAsync()
    Description copied from interface: `AsynchronousCloseable`
    Initiates a shutdown.
    Specified by:
      `closeAsync` in interface `AsynchronousCloseable`
    Returns:
      a stage that will complete when shutdown is complete, never `null`

  - ### all

    public CompletionStage<Collection<Instance>> all()
    Description copied from interface: `Search`
    Retrieves all elements matching the search criteria.
    Specified by:
      `all` in interface `Search<K>`
    Returns:
      a stage that will complete with the first batch of matching elements, never `null`

  - ### any

    public CompletionStage<Instance> any()
    Description copied from interface: `Search`
    Retrieves any one of the elements from a set matching the search criteria.
    Specified by:
      `any` in interface `Search<K>`
    Returns:
      a stage that completes with any one of the matching elements, never `null`