Module: Hermann
- Defined in:
- lib/hermann.rb,
lib/hermann/java.rb,
lib/hermann/errors.rb,
lib/hermann/result.rb,
lib/hermann/timeout.rb,
lib/hermann/version.rb,
lib/hermann/consumer.rb,
lib/hermann/producer.rb,
lib/hermann/discovery/metadata.rb,
lib/hermann/discovery/zookeeper.rb,
lib/hermann/provider/java_producer.rb,
lib/hermann/provider/java_simple_consumer.rb,
ext/hermann/hermann_rdkafka.c
Defined Under Namespace
Modules: ConsumerUtil, Discovery, Errors, JavaApiUtil, JavaUtil, KafkaUtil, ProducerUtil, Provider Classes: Consumer, Producer, Result, Timeout
Constant Summary collapse
- VERSION =
'0.27.0'
Class Method Summary collapse
- .jruby? ⇒ Boolean
-
.package_properties(options) ⇒ Properties
Packages options into Java Properties object.
-
.validate_property!(key, val) ⇒ Object
Validates that the args are non-blank strings.
Class Method Details
.jruby? ⇒ Boolean
2 3 4 |
# File 'lib/hermann.rb', line 2 def self.jruby? return RUBY_PLATFORM == "java" end |
.package_properties(options) ⇒ Properties
Packages options into Java Properties object
23 24 25 26 27 28 29 30 |
# File 'lib/hermann.rb', line 23 def self.package_properties() properties = JavaUtil::Properties.new .each do |key, val| Hermann.validate_property!(key, val) properties.put(key, val) end properties end |
.validate_property!(key, val) ⇒ Object
Validates that the args are non-blank strings
12 13 14 15 16 |
# File 'lib/hermann.rb', line 12 def self.validate_property!(key, val) if key.to_s.empty? || val.to_s.empty? raise Hermann::Errors::ConfigurationError end end |