public abstract 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() |
Modifier and Type | Method and Description |
---|---|
protected abstract String[] |
createProperties()
Created the properties array.
|
boolean |
getBoolean(HazelcastProperty groupProperty)
Returns the configured boolean value of a
HazelcastProperty . |
<E extends Enum> |
getEnum(GroupProperty groupProperty,
Class<E> enumClazz)
Returns the configured enum value of a
GroupProperty . |
float |
getFloat(HazelcastProperty groupProperty)
Returns the configured float value of a
HazelcastProperty . |
int |
getInteger(HazelcastProperty groupProperty)
Returns the configured int value of a
HazelcastProperty . |
long |
getLong(HazelcastProperty groupProperty)
Returns the configured long value of a
HazelcastProperty . |
long |
getMillis(HazelcastProperty groupProperty)
Returns the configured value of a
HazelcastProperty converted to milliseconds. |
long |
getNanos(HazelcastProperty groupProperty)
Returns the configured value of a
HazelcastProperty converted to nanoseconds. |
int |
getSeconds(HazelcastProperty groupProperty)
Returns the configured value of a
HazelcastProperty converted to seconds. |
String |
getString(HazelcastProperty groupProperty)
Returns the configured value of a
HazelcastProperty as String. |
protected void |
initProperties(Properties properties,
HazelcastProperty[] hazelcastProperties)
Creates a container with configured Hazelcast properties.
|
protected abstract String[] createProperties()
protected void initProperties(Properties properties, HazelcastProperty[] hazelcastProperties)
properties
- Properties
used to configure the HazelcastProperty
values.hazelcastProperties
- array of HazelcastProperty
to configurepublic String getString(HazelcastProperty groupProperty)
HazelcastProperty
as String.groupProperty
- the HazelcastProperty
to get the value frompublic boolean getBoolean(HazelcastProperty groupProperty)
HazelcastProperty
.groupProperty
- the HazelcastProperty
to get the value frompublic int getInteger(HazelcastProperty groupProperty)
HazelcastProperty
.groupProperty
- the HazelcastProperty
to get the value fromNumberFormatException
- if the value cannot be parsedpublic long getLong(HazelcastProperty groupProperty)
HazelcastProperty
.groupProperty
- the HazelcastProperty
to get the value fromNumberFormatException
- if the value cannot be parsedpublic float getFloat(HazelcastProperty groupProperty)
HazelcastProperty
.groupProperty
- the HazelcastProperty
to get the value fromNumberFormatException
- if the value cannot be parsedpublic long getNanos(HazelcastProperty groupProperty)
HazelcastProperty
converted to nanoseconds.groupProperty
- the HazelcastProperty
to get the value fromIllegalArgumentException
- if the HazelcastProperty
has no TimeUnit
public long getMillis(HazelcastProperty groupProperty)
HazelcastProperty
converted to milliseconds.groupProperty
- the HazelcastProperty
to get the value fromIllegalArgumentException
- if the HazelcastProperty
has no TimeUnit
public int getSeconds(HazelcastProperty groupProperty)
HazelcastProperty
converted to seconds.groupProperty
- the HazelcastProperty
to get the value fromIllegalArgumentException
- if the HazelcastProperty
has no TimeUnit
public <E extends Enum> E getEnum(GroupProperty groupProperty, Class<E> enumClazz)
GroupProperty
.
The case of the enum is ignored.groupProperty
- the GroupProperty
to get the value fromIllegalArgumentException
- if the enum value can't be foundCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.