public class ConfigDifference extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigDifference.ConfigChange
A single changed config value
|
Constructor and Description |
---|
ConfigDifference() |
Modifier and Type | Method and Description |
---|---|
static Map<String,ConfigDifference.ConfigChange> |
compare(Config config1,
Config config2)
Compares all values in two sets of configs
|
static Map<String,ConfigDifference.ConfigChange> |
compare(com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableMap<String,String>> rawConfig1,
com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableMap<String,String>> rawConfig2)
Compares sets of config options, and returns the difference as a map of 'section.key' strings
to pairs containing the different values.
|
static Map<String,ConfigDifference.ConfigChange> |
compareForCaching(BuckConfig buckConfig1,
BuckConfig buckConfig2)
Compares only the config options that invalidate global state
|
static String |
formatConfigChange(Map.Entry<String,ConfigDifference.ConfigChange> change,
boolean truncate)
Format a single config change
|
static String |
formatConfigDiff(Map<String,ConfigDifference.ConfigChange> diff)
Format the full set of changes between configs to be logged
|
static String |
formatConfigDiffShort(Map<String,ConfigDifference.ConfigChange> diff,
int maxLines)
Format a set of changes between configs for the console
|
public static Map<String,ConfigDifference.ConfigChange> compare(Config config1, Config config2)
public static Map<String,ConfigDifference.ConfigChange> compareForCaching(BuckConfig buckConfig1, BuckConfig buckConfig2)
public static Map<String,ConfigDifference.ConfigChange> compare(com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableMap<String,String>> rawConfig1, com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableMap<String,String>> rawConfig2)
public static String formatConfigDiffShort(Map<String,ConfigDifference.ConfigChange> diff, int maxLines)
public static String formatConfigDiff(Map<String,ConfigDifference.ConfigChange> diff)
public static String formatConfigChange(Map.Entry<String,ConfigDifference.ConfigChange> change, boolean truncate)