public interface ICustomDataProvider
The methods in this interface are thread safe, EXCEPT the deprecated
method that SHOULD NOT BE CALLED.forbiddenGetCustomDataMap(boolean)
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
forbiddenGetCustomDataMap(boolean doCreate)
Deprecated.
|
default <T> T |
getCustomData(String name,
Class<T> valueClass)
Gets a custom data value with the specified name and a specific
valueClass . |
default Object |
putCustomData(String name,
Object value)
Puts a custom data value with the specified name.
|
default Object |
putCustomDataIfAbsent(String name,
Object value)
Puts a custom data value with the specified name if an existing entry is not present.
|
@Deprecated Map<String,Object> forbiddenGetCustomDataMap(boolean doCreate)
Do not call this method!
doCreate
- Creates the map if required.null
if not created.
Note: the map returned is NOT synchronized thus not thread safe. It is up to the caller to synchronize on it to ensure thread safety.
default Object putCustomData(String name, Object value)
name
- The name of the custom data to ut.value
- The value to set, null
to clear the named custom data value,
and return any cleared existing value.null
for no previous value.default Object putCustomDataIfAbsent(String name, Object value)
name
- The name of the custom data to put.value
- The value to set, null
to clear the named custom data value,
and return any cleared existing value.null
for no previous value indicating that
the value
was put successfully.default <T> T getCustomData(String name, Class<T> valueClass)
valueClass
.
If an existing value is present of the matching class, that value is returned,
otherwise null
is returned.name
- The name of the custom data to retrieve.valueClass
- The value class requested upon return.valueClass
,
or null
if the value was not found by that name, or if the
valueClass
did not match the existing value in the custom data.iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.