public abstract class PulsarConfiguration extends UnmodifiableConfiguration
Configuration
for Pulsar. We provide extra methods for building the
different Pulsar client instance.confData
Modifier | Constructor and Description |
---|---|
protected |
PulsarConfiguration(Configuration config)
Creates a new PulsarConfiguration, which holds a copy of the given configuration that can't
be altered.
|
Modifier and Type | Method and Description |
---|---|
<F,T> T |
get(ConfigOption<F> option,
java.util.function.Function<F,T> convertor)
Get an option value from the given config, convert it into a new value instance.
|
Map<String,String> |
getProperties(ConfigOption<Map<String,String>> option)
Get the option value by a prefix.
|
<T> void |
useOption(ConfigOption<T> option,
java.util.function.Consumer<T> setter)
Set the config option's value to a given builder.
|
<T,V> void |
useOption(ConfigOption<T> option,
java.util.function.Function<T,V> convertor,
java.util.function.Consumer<V> setter)
Query the config option's value, convert it into a required type, set it to a given builder.
|
addAll, addAll, addAllToProperties, removeConfig
clone, contains, containsKey, equals, fromMap, get, getBoolean, getBoolean, getBoolean, getBytes, getClass, getDouble, getDouble, getDouble, getEnum, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getOptional, getString, getString, getString, getValue, hashCode, keySet, read, removeKey, set, setBoolean, setBoolean, setBytes, setClass, setDouble, setDouble, setFloat, setFloat, setInteger, setInteger, setLong, setLong, setString, setString, toMap, toString, write
protected PulsarConfiguration(Configuration config)
config
- The configuration with the original contents.public Map<String,String> getProperties(ConfigOption<Map<String,String>> option)
public <F,T> T get(ConfigOption<F> option, java.util.function.Function<F,T> convertor)
public <T> void useOption(ConfigOption<T> option, java.util.function.Consumer<T> setter)
public <T,V> void useOption(ConfigOption<T> option, java.util.function.Function<T,V> convertor, java.util.function.Consumer<V> setter)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.