public class ConfigSourceSet extends Object implements ConfigSource
Modifier and Type | Field and Description |
---|---|
private static Logger |
log |
private Set<String> |
sources |
Constructor and Description |
---|
ConfigSourceSet()
Creates an empty ConfigSourceSet, mostly used for unit testing.
|
ConfigSourceSet(List<String> addresses)
Creates a ConfigSourceSet containing all the unique given input addresses.
|
ConfigSourceSet(String address)
Convenience constructor to create a ConfigSourceSet with only one input address.
|
ConfigSourceSet(String[] addresses)
Creates a ConfigSourceSet containing all the unique given input addresses.
|
Modifier and Type | Method and Description |
---|---|
private static String[] |
checkSourcesSyntax(String sources)
Check sources syntax and convert it to a proper source set by checking if
sources start with the required "tcp/" prefix and add that prefix if not.
|
static ConfigSourceSet |
createDefault()
Create a new source set using the environment variables or system properties
|
boolean |
equals(Object o) |
Set<String> |
getSources()
Returns an unmodifiable set containing all sources in this ConfigSourceSet.
|
int |
hashCode() |
String |
toString() |
public ConfigSourceSet()
public ConfigSourceSet(List<String> addresses)
addresses
- Connection endpoints on the format "tcp/host:port".public ConfigSourceSet(String[] addresses)
addresses
- Connection endpoints on the format "tcp/host:port".public ConfigSourceSet(String address)
address
- Connection endpoint on the format "tcp/host:port".public Set<String> getSources()
public static ConfigSourceSet createDefault()
private static String[] checkSourcesSyntax(String sources)
sources
- a source set as a comma-separated stringCopyright © 2018. All rights reserved.