Package org.pentaho.di.core
Class ConcurrentMapProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- org.pentaho.di.core.ConcurrentMapProperties
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
public class ConcurrentMapProperties extends Properties
Thread Safe version of Java Properties class.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ConcurrentMap<Object,Object>storageMap-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Constructor Description ConcurrentMapProperties()ConcurrentMapProperties(Properties defaults)
-
Method Summary
-
Methods inherited from class java.util.Properties
rehash, storeToXML
-
-
-
-
Field Detail
-
storageMap
protected ConcurrentMap<Object,Object> storageMap
-
-
Constructor Detail
-
ConcurrentMapProperties
public ConcurrentMapProperties()
-
ConcurrentMapProperties
public ConcurrentMapProperties(Properties defaults)
-
-
Method Detail
-
clear
public void clear()
-
clone
public Object clone()
- Overrides:
clonein classProperties
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<Object,Object>- Overrides:
containsValuein classProperties
-
compute
public Object compute(Object key, BiFunction<? super Object,? super Object,? extends Object> remappingFunction)
-
computeIfAbsent
public Object computeIfAbsent(Object key, Function<? super Object,? extends Object> mappingFunction)
- Specified by:
computeIfAbsentin interfaceMap<Object,Object>- Overrides:
computeIfAbsentin classProperties
-
computeIfPresent
public Object computeIfPresent(Object key, BiFunction<? super Object,? super Object,? extends Object> remappingFunction)
- Specified by:
computeIfPresentin interfaceMap<Object,Object>- Overrides:
computeIfPresentin classProperties
-
contains
public boolean contains(Object value)
- Overrides:
containsin classProperties
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<Object,Object>- Overrides:
containsKeyin classProperties
-
elements
public Enumeration<Object> elements()
- Overrides:
elementsin classProperties
-
forEach
public void forEach(BiConsumer<? super Object,? super Object> action)
-
getOrDefault
public Object getOrDefault(Object key, Object defaultValue)
- Specified by:
getOrDefaultin interfaceMap<Object,Object>- Overrides:
getOrDefaultin classProperties
-
keys
public Enumeration<Object> keys()
- Overrides:
keysin classProperties
-
merge
public Object merge(Object key, Object value, BiFunction<? super Object,? super Object,? extends Object> remappingFunction)
-
putIfAbsent
public Object putIfAbsent(Object key, Object value)
- Specified by:
putIfAbsentin interfaceMap<Object,Object>- Overrides:
putIfAbsentin classProperties
-
replaceAll
public void replaceAll(BiFunction<? super Object,? super Object,? extends Object> function)
- Specified by:
replaceAllin interfaceMap<Object,Object>- Overrides:
replaceAllin classProperties
-
values
public Collection<Object> values()
-
getProperty
public String getProperty(String key)
- Overrides:
getPropertyin classProperties
-
getProperty
public String getProperty(String key, String defaultValue)
- Overrides:
getPropertyin classProperties
-
setProperty
public Object setProperty(String key, String value)
- Overrides:
setPropertyin classProperties
-
equals
public boolean equals(Object o)
-
toString
public String toString()
- Overrides:
toStringin classProperties
-
hashCode
public int hashCode()
-
propertyNames
public Enumeration<?> propertyNames()
- Overrides:
propertyNamesin classProperties
-
stringPropertyNames
public Set<String> stringPropertyNames()
- Overrides:
stringPropertyNamesin classProperties
-
list
public void list(PrintStream out)
- Overrides:
listin classProperties
-
list
public void list(PrintWriter out)
- Overrides:
listin classProperties
-
load
public void load(InputStream inStream) throws IOException
- Overrides:
loadin classProperties- Throws:
IOException
-
load
public void load(Reader reader) throws IOException
- Overrides:
loadin classProperties- Throws:
IOException
-
loadFromXML
public void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException
- Overrides:
loadFromXMLin classProperties- Throws:
IOExceptionInvalidPropertiesFormatException
-
save
@Deprecated public void save(OutputStream out, String comments)
Deprecated.- Overrides:
savein classProperties
-
store
public void store(OutputStream out, String comments) throws IOException
- Overrides:
storein classProperties- Throws:
IOException
-
store
public void store(Writer writer, String comments) throws IOException
- Overrides:
storein classProperties- Throws:
IOException
-
storeToXML
public void storeToXML(OutputStream os, String comment) throws IOException
- Overrides:
storeToXMLin classProperties- Throws:
IOException
-
storeToXML
public void storeToXML(OutputStream os, String comment, String encoding) throws IOException
- Overrides:
storeToXMLin classProperties- Throws:
IOException
-
convertProperties
public static ConcurrentMapProperties convertProperties(Properties props)
Converts a Properties object to a ConcurrentMapProperties object- Parameters:
props-- Returns:
- A new ConcurrentMapProperties with all properties enumerated (including defaults)
-
-