Package org.pentaho.di.core
Class ConcurrentMapProperties
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
Object>
Thread Safe version of Java Properties class.
- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
clone()
computeIfAbsent
(Object key, Function<? super Object, ? extends Object> mappingFunction) computeIfPresent
(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) boolean
boolean
containsKey
(Object key) boolean
containsValue
(Object value) static ConcurrentMapProperties
convertProperties
(Properties props) Converts a Properties object to a ConcurrentMapProperties objectelements()
entrySet()
boolean
void
forEach
(BiConsumer<? super Object, ? super Object> action) getOrDefault
(Object key, Object defaultValue) getProperty
(String key) getProperty
(String key, String defaultValue) int
hashCode()
boolean
isEmpty()
keys()
keySet()
void
list
(PrintStream out) void
list
(PrintWriter out) void
load
(InputStream inStream) void
void
merge
(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) Enumeration<?>
void
putIfAbsent
(Object key, Object value) boolean
boolean
void
replaceAll
(BiFunction<? super Object, ? super Object, ? extends Object> function) void
save
(OutputStream out, String comments) Deprecated.setProperty
(String key, String value) int
size()
void
store
(OutputStream out, String comments) void
void
storeToXML
(OutputStream os, String comment) void
storeToXML
(OutputStream os, String comment, String encoding) toString()
values()
Methods inherited from class java.util.Properties
rehash, storeToXML
-
Field Details
-
storageMap
-
-
Constructor Details
-
ConcurrentMapProperties
public ConcurrentMapProperties() -
ConcurrentMapProperties
-
-
Method Details
-
put
-
remove
-
clear
public void clear() -
clone
- Overrides:
clone
in classProperties
-
containsValue
- Specified by:
containsValue
in interfaceMap<Object,
Object> - Overrides:
containsValue
in classProperties
-
get
-
compute
-
computeIfAbsent
public Object computeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) - Specified by:
computeIfAbsent
in interfaceMap<Object,
Object> - Overrides:
computeIfAbsent
in classProperties
-
computeIfPresent
public Object computeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) - Specified by:
computeIfPresent
in interfaceMap<Object,
Object> - Overrides:
computeIfPresent
in classProperties
-
contains
- Overrides:
contains
in classProperties
-
isEmpty
public boolean isEmpty() -
size
public int size() -
containsKey
- Specified by:
containsKey
in interfaceMap<Object,
Object> - Overrides:
containsKey
in classProperties
-
elements
- Overrides:
elements
in classProperties
-
entrySet
-
forEach
-
getOrDefault
- Specified by:
getOrDefault
in interfaceMap<Object,
Object> - Overrides:
getOrDefault
in classProperties
-
keys
- Overrides:
keys
in classProperties
-
keySet
-
merge
-
putAll
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<Object,
Object> - Overrides:
putIfAbsent
in classProperties
-
remove
-
replace
-
replaceAll
- Specified by:
replaceAll
in interfaceMap<Object,
Object> - Overrides:
replaceAll
in classProperties
-
replace
-
values
-
getProperty
- Overrides:
getProperty
in classProperties
-
getProperty
- Overrides:
getProperty
in classProperties
-
setProperty
- Overrides:
setProperty
in classProperties
-
equals
-
toString
- Overrides:
toString
in classProperties
-
hashCode
public int hashCode() -
propertyNames
- Overrides:
propertyNames
in classProperties
-
stringPropertyNames
- Overrides:
stringPropertyNames
in classProperties
-
list
- Overrides:
list
in classProperties
-
list
- Overrides:
list
in classProperties
-
load
- Overrides:
load
in classProperties
- Throws:
IOException
-
load
- Overrides:
load
in classProperties
- Throws:
IOException
-
loadFromXML
- Overrides:
loadFromXML
in classProperties
- Throws:
IOException
InvalidPropertiesFormatException
-
save
Deprecated.- Overrides:
save
in classProperties
-
store
- Overrides:
store
in classProperties
- Throws:
IOException
-
store
- Overrides:
store
in classProperties
- Throws:
IOException
-
storeToXML
- Overrides:
storeToXML
in classProperties
- Throws:
IOException
-
storeToXML
- Overrides:
storeToXML
in classProperties
- Throws:
IOException
-
convertProperties
Converts a Properties object to a ConcurrentMapProperties object- Parameters:
props
-- Returns:
- A new ConcurrentMapProperties with all properties enumerated (including defaults)
-