io.vertx.servicediscovery.types

## Interface RedisDataSource

- All Superinterfaces:
    ServiceType

      public interface RedisDataSource
      extends ServiceType

  Service type for Redis data source.
  Author:
    Eric Zhao

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TYPE`

    - ### Fields inherited from interface io.vertx.servicediscovery.spi.ServiceType

      `UNKNOWN`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Record` | `createRecord(String name, JsonObject location, JsonObject metadata)` Convenient method to create a record for a Redis data source.
    `static Future<Redis>` | `getRedisClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter)` Like `getRedisClient(ServiceDiscovery, Function, Handler)` but returns a future of the result
    `static void` | `getRedisClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, Handler<AsyncResult<Redis>> resultHandler)` Convenient method that looks for a Redis data source and provides the configured `Redis`.
    `static Future<Redis>` | `getRedisClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, JsonObject consumerConfiguration)` Like `getRedisClient(ServiceDiscovery, Function, JsonObject, Handler)` but returns a future of the result
    `static void` | `getRedisClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, JsonObject consumerConfiguration, Handler<AsyncResult<Redis>> resultHandler)` Convenient method that looks for a Redis data source and provides the configured `Redis`.
    `static Future<Redis>` | `getRedisClient(ServiceDiscovery discovery, JsonObject filter)` Like `getRedisClient(ServiceDiscovery, JsonObject, Handler)` but returns a future of the result
    `static void` | `getRedisClient(ServiceDiscovery discovery, JsonObject filter, Handler<AsyncResult<Redis>> resultHandler)` Convenient method that looks for a Redis data source and provides the configured `Redis`.
    `static Future<Redis>` | `getRedisClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration)` Like `getRedisClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result
    `static void` | `getRedisClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration, Handler<AsyncResult<Redis>> resultHandler)` Convenient method that looks for a Redis data source and provides the configured `Redis`.

    - ### Methods inherited from interface io.vertx.servicediscovery.spi.ServiceType

      `get, name`

- - ### Field Detail

    - #### TYPE

          static final String TYPE

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### createRecord

          static Record createRecord(String name,
                                     JsonObject location,
                                     JsonObject metadata)

      Convenient method to create a record for a Redis data source.
      Parameters:
        `name` - the service name
        `location` - the location of the service (e.g. url, port...)
        `metadata` - additional metadata
      Returns:
        the created record

    - #### getRedisClient

          static void getRedisClient(ServiceDiscovery discovery,
                                     JsonObject filter,
                                     Handler<AsyncResult<Redis>> resultHandler)

      Convenient method that looks for a Redis data source and provides the configured `Redis`. The async result is marked as failed is there are no matching services, or if the lookup fails.
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter, optional
        `resultHandler` - The result handler

    - #### getRedisClient

          static Future<Redis> getRedisClient(ServiceDiscovery discovery,
                                              JsonObject filter)

      Like `getRedisClient(ServiceDiscovery, JsonObject, Handler)` but returns a future of the result

    - #### getRedisClient

          static void getRedisClient(ServiceDiscovery discovery,
                                     java.util.function.Function<Record,Boolean> filter,
                                     Handler<AsyncResult<Redis>> resultHandler)

      Convenient method that looks for a Redis data source and provides the configured `Redis`. The async result is marked as failed is there are no matching services, or if the lookup fails.
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter, cannot be `null`
        `resultHandler` - The result handler

    - #### getRedisClient

          static Future<Redis> getRedisClient(ServiceDiscovery discovery,
                                              java.util.function.Function<Record,Boolean> filter)

      Like `getRedisClient(ServiceDiscovery, Function, Handler)` but returns a future of the result

    - #### getRedisClient

          static void getRedisClient(ServiceDiscovery discovery,
                                     JsonObject filter,
                                     JsonObject consumerConfiguration,
                                     Handler<AsyncResult<Redis>> resultHandler)

      Convenient method that looks for a Redis data source and provides the configured `Redis`. The async result is marked as failed is there are no matching services, or if the lookup fails.
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter, optional
        `consumerConfiguration` - The additional consumer configuration
        `resultHandler` - The result handler

    - #### getRedisClient

          static Future<Redis> getRedisClient(ServiceDiscovery discovery,
                                              JsonObject filter,
                                              JsonObject consumerConfiguration)

      Like `getRedisClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result

    - #### getRedisClient

          static void getRedisClient(ServiceDiscovery discovery,
                                     java.util.function.Function<Record,Boolean> filter,
                                     JsonObject consumerConfiguration,
                                     Handler<AsyncResult<Redis>> resultHandler)

      Convenient method that looks for a Redis data source and provides the configured `Redis`. The async result is marked as failed is there are no matching services, or if the lookup fails.
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter, cannot be `null`
        `consumerConfiguration` - The additional consumer configuration
        `resultHandler` - The result handler

    - #### getRedisClient

          static Future<Redis> getRedisClient(ServiceDiscovery discovery,
                                              java.util.function.Function<Record,Boolean> filter,
                                              JsonObject consumerConfiguration)

      Like `getRedisClient(ServiceDiscovery, Function, JsonObject, Handler)` but returns a future of the result

Copyright © 2021 Eclipse. All rights reserved.