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
AnAccumuloConfiguration
which 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 String
get(Property property)
Gets a property value from this configuration.void
getProperties(Map<String,String> props, Predicate<String> filter)
Returns property key/value pairs in this configuration.long
getUpdateCount()
Each time configuration changes, this counter should increase.boolean
isPropertySet(Property prop)
void
set(String key, String value)
Sets a property in this configuration.void
set(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:AccumuloConfiguration
Gets a property value from this configuration.- Specified by:
get
in classAccumuloConfiguration
- Parameters:
property
- property to get- Returns:
- property value
-
getProperties
public void getProperties(Map<String,String> props, Predicate<String> filter)
Description copied from class:AccumuloConfiguration
Returns 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:
getProperties
in 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:AccumuloConfiguration
Each 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:
getUpdateCount
in classAccumuloConfiguration
-
isPropertySet
public boolean isPropertySet(Property prop)
- Specified by:
isPropertySet
in classAccumuloConfiguration
-
-