Package org.apache.accumulo.core.conf
Class ConfigurationCopy
- java.lang.Object
-
- org.apache.accumulo.core.conf.AccumuloConfiguration
-
- org.apache.accumulo.core.conf.ConfigurationCopy
-
public class ConfigurationCopy extends AccumuloConfiguration
AnAccumuloConfigurationwhich holds a flat copy of properties defined in another configuration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
AccumuloConfiguration.Deriver<T>, AccumuloConfiguration.ScanExecutorConfig
-
-
Constructor Summary
Constructors Constructor Description ConfigurationCopy()Creates a new empty configuration.ConfigurationCopy(Iterable<Map.Entry<String,String>> config)Creates a new configuration.ConfigurationCopy(Map<String,String> config)Creates a new configuration.ConfigurationCopy(Stream<Map.Entry<String,String>> config)Creates a new configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget(Property property)Gets a property value from this configuration.voidgetProperties(Map<String,String> props, Predicate<String> filter)Returns property key/value pairs in this configuration.longgetUpdateCount()Each time configuration changes, this counter should increase.booleanisPropertySet(Property prop)voidset(String key, String value)Sets a property in this configuration.voidset(Property prop, String value)Sets a property in this configuration.-
Methods inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
get, getAllCryptoProperties, getAllPropertiesWithPrefix, getAllPropertiesWithPrefixStripped, getAsBytes, getBoolean, getCount, getFraction, getMaxFilesPerTablet, getParent, getPath, getPort, getPortStream, getScanExecutors, getTimeInMillis, invalidateCache, iterator, newDeriver, resolve, stream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ConfigurationCopy
public ConfigurationCopy(Map<String,String> config)
Creates a new configuration.- Parameters:
config- configuration property key/value pairs to copy
-
ConfigurationCopy
public ConfigurationCopy(Stream<Map.Entry<String,String>> config)
Creates a new configuration.- Parameters:
config- configuration property stream to use for copying
-
ConfigurationCopy
public ConfigurationCopy(Iterable<Map.Entry<String,String>> config)
Creates a new configuration.- Parameters:
config- configuration property iterable to use for copying
-
ConfigurationCopy
public ConfigurationCopy()
Creates a new empty configuration.
-
-
Method Detail
-
get
public String get(Property property)
Description copied from class:AccumuloConfigurationGets a property value from this configuration.- Specified by:
getin classAccumuloConfiguration- Parameters:
property- property to get- Returns:
- property value
-
getProperties
public void getProperties(Map<String,String> props, Predicate<String> filter)
Description copied from class:AccumuloConfigurationReturns property key/value pairs in this configuration. The pairs include those defined in this configuration which pass the given filter, and those supplied from the parent configuration which are not included from here.- Specified by:
getPropertiesin classAccumuloConfiguration- Parameters:
props- properties object to populatefilter- filter for accepting properties from this configuration
-
set
public void set(Property prop, String value)
Sets a property in this configuration.- Parameters:
prop- property to setvalue- property value
-
set
public void set(String key, String value)
Sets a property in this configuration.- Parameters:
key- key of property to setvalue- property value
-
getUpdateCount
public long getUpdateCount()
Description copied from class:AccumuloConfigurationEach time configuration changes, this counter should increase. Anything that caches information that is derived from configuration can use this method to know when to update.- Overrides:
getUpdateCountin classAccumuloConfiguration
-
isPropertySet
public boolean isPropertySet(Property prop)
- Specified by:
isPropertySetin classAccumuloConfiguration
-
-