public class HazelcastProperties extends Object
HazelcastProperty).
A HazelcastProperty can be set as:
System.setProperty(String, String)Config.setProperty(String, String)http://docs.hazelcast.org/docs/latest-dev/manual/html-single/hazelcast-documentation.html#system-properties| Constructor and Description |
|---|
HazelcastProperties(Config config)
Creates a container with configured Hazelcast properties.
|
HazelcastProperties(Properties nullableProperties)
Creates a container with configured Hazelcast properties.
|
| Modifier and Type | Method and Description |
|---|---|
String |
get(String key)
Returns the value for the given key.
|
boolean |
getBoolean(HazelcastProperty property)
Returns the configured boolean value of a
HazelcastProperty. |
<E extends Enum> |
getEnum(HazelcastProperty property,
Class<E> enumClazz)
Returns the configured enum value of a
GroupProperty. |
float |
getFloat(HazelcastProperty property)
Returns the configured float value of a
HazelcastProperty. |
int |
getInteger(HazelcastProperty property)
Returns the configured int value of a
HazelcastProperty. |
long |
getLong(HazelcastProperty property)
Returns the configured long value of a
HazelcastProperty. |
long |
getMillis(HazelcastProperty property)
Returns the configured value of a
HazelcastProperty converted to milliseconds. |
long |
getNanos(HazelcastProperty property)
Returns the configured value of a
HazelcastProperty converted to nanoseconds. |
int |
getSeconds(HazelcastProperty property)
Returns the configured value of a
HazelcastProperty converted to seconds. |
String |
getString(HazelcastProperty property)
Returns the configured value of a
HazelcastProperty as String. |
Set<String> |
keySet()
Returns an immutable set of all keys in this HazelcastProperties.
|
public HazelcastProperties(Config config)
config - Config used to configure the HazelcastProperty values.
Properties in config are allowed to be null.public HazelcastProperties(Properties nullableProperties)
nullableProperties - Properties used to configure the HazelcastProperty values.
Properties are allowed to be null.public Set<String> keySet()
public String get(String key)
key - the keyNullPointerException - if key is null.public String getString(HazelcastProperty property)
HazelcastProperty as String.property - the HazelcastProperty to get the value frompublic boolean getBoolean(HazelcastProperty property)
HazelcastProperty.property - the HazelcastProperty to get the value frompublic int getInteger(HazelcastProperty property)
HazelcastProperty.property - the HazelcastProperty to get the value fromNumberFormatException - if the value cannot be parsedpublic long getLong(HazelcastProperty property)
HazelcastProperty.property - the HazelcastProperty to get the value fromNumberFormatException - if the value cannot be parsedpublic float getFloat(HazelcastProperty property)
HazelcastProperty.property - the HazelcastProperty to get the value fromNumberFormatException - if the value cannot be parsedpublic long getNanos(HazelcastProperty property)
HazelcastProperty converted to nanoseconds.property - the HazelcastProperty to get the value fromIllegalArgumentException - if the HazelcastProperty has no TimeUnitpublic long getMillis(HazelcastProperty property)
HazelcastProperty converted to milliseconds.property - the HazelcastProperty to get the value fromIllegalArgumentException - if the HazelcastProperty has no TimeUnitpublic int getSeconds(HazelcastProperty property)
HazelcastProperty converted to seconds.property - the HazelcastProperty to get the value fromIllegalArgumentException - if the HazelcastProperty has no TimeUnitpublic <E extends Enum> E getEnum(HazelcastProperty property, Class<E> enumClazz)
GroupProperty.
The case of the enum is ignored.property - the GroupProperty to get the value fromIllegalArgumentException - if the enum value can't be foundCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.