Interface RedisDataSource
- All Superinterfaces:
ServiceType
Service type for Redis data source.
- Author:
- Eric Zhao
-
Field Summary
FieldsFields inherited from interface ServiceType
UNKNOWN -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic RecordcreateRecord(String name, JsonObject location, JsonObject metadata) Convenient method to create a record for a Redis data source.getRedisClient(ServiceDiscovery discovery, JsonObject filter) Convenient method that looks for a Redis data source and provides the configuredRedis.getRedisClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration) Convenient method that looks for a Redis data source and provides the configuredRedis.getRedisClient(ServiceDiscovery discovery, Function<Record, Boolean> filter) Convenient method that looks for a Redis data source and provides the configuredRedis.getRedisClient(ServiceDiscovery discovery, Function<Record, Boolean> filter, JsonObject consumerConfiguration) Convenient method that looks for a Redis data source and provides the configuredRedis.Methods inherited from interface ServiceType
get, name
-
Field Details
-
TYPE
- See Also:
-
-
Method Details
-
createRecord
Convenient method to create a record for a Redis data source.- Parameters:
name- the service namelocation- the location of the service (e.g. url, port...)metadata- additional metadata- Returns:
- the created record
-
getRedisClient
Convenient method that looks for a Redis data source and provides the configuredRedis. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optional- Returns:
- a future notified with the client
-
getRedisClient
Convenient method that looks for a Redis data source and provides the configuredRedis. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, cannot benull- Returns:
- a future notified with the client
-
getRedisClient
static Future<Redis> getRedisClient(ServiceDiscovery discovery, JsonObject filter, JsonObject consumerConfiguration) Convenient method that looks for a Redis data source and provides the configuredRedis. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, optionalconsumerConfiguration- The additional consumer configuration- Returns:
- a future notified with the client
-
getRedisClient
static Future<Redis> getRedisClient(ServiceDiscovery discovery, Function<Record, Boolean> filter, JsonObject consumerConfiguration) Convenient method that looks for a Redis data source and provides the configuredRedis. The async result is marked as failed is there are no matching services, or if the lookup fails.- Parameters:
discovery- The service discovery instancefilter- The filter, cannot benullconsumerConfiguration- The additional consumer configuration- Returns:
- a future notified with the client
-