Class: VertxServiceDiscovery::RedisDataSource
- Inherits:
-
Object
- Object
- VertxServiceDiscovery::RedisDataSource
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb
Overview
Service type for Redis data source.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (Hash) create_record(name = nil, location = nil, metadata = nil)
Convenient method to create a record for a Redis data source.
-
+ (void) get_redis_client(param_1 = nil, param_2 = nil, param_3 = nil)
Convenient method that looks for a Redis data source and provides the configured VertxRedis::RedisClient.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) TYPE
-
+ (Object) UNKNOWN
Unknown type.
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Class Method Details
+ (Boolean) accept?(obj)
19 20 21 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 19 def @@j_api_type.accept?(obj) obj.class == RedisDataSource end |
+ (Hash) create_record(name = nil, location = nil, metadata = nil)
Convenient method to create a record for a Redis data source.
39 40 41 42 43 44 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 39 def self.create_record(name=nil,location=nil,=nil) if name.class == String && location.class == Hash && .class == Hash && !block_given? return Java::IoVertxServicediscoveryTypes::RedisDataSource.java_method(:createRecord, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(name,::Vertx::Util::Utils.to_json_object(location),::Vertx::Util::Utils.to_json_object()) != nil ? JSON.parse(Java::IoVertxServicediscoveryTypes::RedisDataSource.java_method(:createRecord, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(name,::Vertx::Util::Utils.to_json_object(location),::Vertx::Util::Utils.to_json_object()).toJson.encode) : nil end raise ArgumentError, "Invalid arguments when calling create_record(#{name},#{location},#{})" end |
+ (void) getRedisClient(discovery, filter, resultHandler) { ... } + (void) getRedisClient(discovery, filter, resultHandler) { ... } + (void) getRedisClient(discovery, filter, consumerConfiguration, resultHandler) { ... } + (void) getRedisClient(discovery, filter, consumerConfiguration, resultHandler) { ... }
This method returns an undefined value.
Convenient method that looks for a Redis data source and provides the configured VertxRedis::RedisClient. The async result is marked as failed is there are no matching services, or if the lookup fails.
66 67 68 69 70 71 72 73 74 75 76 77 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 66 def self.get_redis_client(param_1=nil,param_2=nil,param_3=nil) if param_1.class.method_defined?(:j_del) && param_2.class == Hash && block_given? && param_3 == nil return Java::IoVertxServicediscoveryTypes::RedisDataSource.java_method(:getRedisClient, [Java::IoVertxServicediscovery::ServiceDiscovery.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxRedis::RedisClient) : nil) })) elsif param_1.class.method_defined?(:j_del) && param_2.class == Proc && block_given? && param_3 == nil return Java::IoVertxServicediscoveryTypes::RedisDataSource.java_method(:getRedisClient, [Java::IoVertxServicediscovery::ServiceDiscovery.java_class,Java::JavaUtilFunction::Function.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1.j_del,(Proc.new { |event| param_2.call(event != nil ? JSON.parse(event.toJson.encode) : nil) }),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxRedis::RedisClient) : nil) })) elsif param_1.class.method_defined?(:j_del) && param_2.class == Hash && param_3.class == Hash && block_given? return Java::IoVertxServicediscoveryTypes::RedisDataSource.java_method(:getRedisClient, [Java::IoVertxServicediscovery::ServiceDiscovery.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2),::Vertx::Util::Utils.to_json_object(param_3),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxRedis::RedisClient) : nil) })) elsif param_1.class.method_defined?(:j_del) && param_2.class == Proc && param_3.class == Hash && block_given? return Java::IoVertxServicediscoveryTypes::RedisDataSource.java_method(:getRedisClient, [Java::IoVertxServicediscovery::ServiceDiscovery.java_class,Java::JavaUtilFunction::Function.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1.j_del,(Proc.new { |event| param_2.call(event != nil ? JSON.parse(event.toJson.encode) : nil) }),::Vertx::Util::Utils.to_json_object(param_3),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxRedis::RedisClient) : nil) })) end raise ArgumentError, "Invalid arguments when calling get_redis_client(#{param_1},#{param_2},#{param_3})" end |
+ (Object) j_api_type
28 29 30 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 28 def self.j_api_type @@j_api_type end |
+ (Object) j_class
31 32 33 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 31 def self.j_class Java::IoVertxServicediscoveryTypes::RedisDataSource.java_class end |
+ (Object) TYPE
82 83 84 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 82 def self.TYPE Java::IoVertxServicediscoveryTypes::RedisDataSource.TYPE end |
+ (Object) UNKNOWN
Unknown type.
79 80 81 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 79 def self.UNKNOWN Java::IoVertxServicediscoveryTypes::RedisDataSource.UNKNOWN end |
+ (Object) unwrap(obj)
25 26 27 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 25 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
22 23 24 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/redis_data_source.rb', line 22 def @@j_api_type.wrap(obj) RedisDataSource.new(obj) end |