org.terracotta.cluster
Interface ClusterProperties

All Known Implementing Classes:
TerracottaProperties

public interface ClusterProperties


Method Summary
 Boolean getBoolean(String key)
          Returns a boolean for the given property in this properties object.
 Boolean getBoolean(String key, Boolean defaultValue)
          Returns a boolean for the given property in this properties object.
 Integer getInteger(String key)
          Returns an integer for the given property in this properties object.
 Integer getInteger(String key, Integer defaultValue)
          Returns an integer for the given property in this properties object.
 Long getLong(String key)
          Returns a long for the given property in this properties object.
 Long getLong(String key, Long defaultValue)
          Returns a long for the given property in this properties object.
 String getProperty(String key)
          Searches for the property with the specified key in this properties object.
 String getProperty(String key, String defaultValue)
          Searches for the property with the specified key in this properties object.
 void setProperty(String key, String value)
          Sets the given property.
 

Method Detail

getInteger

Integer getInteger(String key)
Returns an integer for the given property in this properties object.

If the property is found and is successfully parsed as an Integer value then the parsed integer value is returned. Otherwise null is returned.

Parameters:
key - the property key.
Returns:
the resultant Integer value

getInteger

Integer getInteger(String key,
                   Integer defaultValue)
Returns an integer for the given property in this properties object.

If the property is found and is successfully parsed as an Integer value then the parsed integer value is returned. Otherwise the default value is returned.

Parameters:
key - the property key.
Returns:
the resultant Integer value

getLong

Long getLong(String key)
Returns a long for the given property in this properties object.

If the property is found and is successfully parsed as a Long value then the parsed long value is returned. Otherwise null is returned.

Parameters:
key - the property key.
Returns:
the resultant Long value

getLong

Long getLong(String key,
             Long defaultValue)
Returns a long for the given property in this properties object.

If the property is found and is successfully parsed as a Long value then the parsed long value is returned. Otherwise the default value is returned.

Parameters:
key - the property key.
Returns:
the resultant Long value

getBoolean

Boolean getBoolean(String key)
Returns a boolean for the given property in this properties object.

If the property is found and is equal (ignoring case) to true then Boolean.TRUE is returned. Otherwise Boolean.FALSE is returned.

Parameters:
key - the property key.
Returns:
the resultant Boolean value

getBoolean

Boolean getBoolean(String key,
                   Boolean defaultValue)
Returns a boolean for the given property in this properties object.

If the property is not found then the default value is returned;

Otherwise if the property is equal (ignoring case) to true then Boolean.TRUE is returned, if not then Boolean.FALSE is returned.

Parameters:
key - the property key.
Returns:
the resultant Boolean value

getProperty

String getProperty(String key)
Searches for the property with the specified key in this properties object.

If the property is not found then null is returned.

Parameters:
key - the property key.
Returns:
the value in this properties object with the specified key.

getProperty

String getProperty(String key,
                   String defaultValue)
Searches for the property with the specified key in this properties object.

If the property is not found then the default value is returned

Parameters:
key - the property key.
Returns:
the value in this properties object with the specified key.

setProperty

void setProperty(String key,
                 String value)
                 throws NullPointerException
Sets the given property.

The given system property is set to the supplied string value.

Parameters:
key - the property key
value - the string to set the property to
Throws:
NullPointerException - if the key or value is null


Copyright © 2015 Terracotta, Inc.. All Rights Reserved.