org.terracotta.cluster
Class TerracottaProperties

java.lang.Object
  extended by org.terracotta.cluster.TerracottaProperties
All Implemented Interfaces:
ClusterProperties

public class TerracottaProperties
extends Object
implements ClusterProperties


Constructor Summary
TerracottaProperties()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TerracottaProperties

public TerracottaProperties()
Method Detail

getBoolean

public Boolean getBoolean(String key,
                          Boolean defaultValue)
Description copied from interface: ClusterProperties
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.

Specified by:
getBoolean in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the resultant Boolean value

getBoolean

public Boolean getBoolean(String key)
Description copied from interface: ClusterProperties
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.

Specified by:
getBoolean in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the resultant Boolean value

getInteger

public Integer getInteger(String key,
                          Integer defaultValue)
Description copied from interface: ClusterProperties
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.

Specified by:
getInteger in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the resultant Integer value

getInteger

public Integer getInteger(String key)
Description copied from interface: ClusterProperties
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.

Specified by:
getInteger in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the resultant Integer value

getLong

public Long getLong(String key,
                    Long defaultValue)
Description copied from interface: ClusterProperties
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.

Specified by:
getLong in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the resultant Long value

getLong

public Long getLong(String key)
Description copied from interface: ClusterProperties
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.

Specified by:
getLong in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the resultant Long value

getProperty

public String getProperty(String key,
                          String defaultValue)
Description copied from interface: ClusterProperties
Searches for the property with the specified key in this properties object.

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

Specified by:
getProperty in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the value in this properties object with the specified key.

getProperty

public String getProperty(String key)
Description copied from interface: ClusterProperties
Searches for the property with the specified key in this properties object.

If the property is not found then null is returned.

Specified by:
getProperty in interface ClusterProperties
Parameters:
key - the property key.
Returns:
the value in this properties object with the specified key.

setProperty

public void setProperty(String key,
                        String value)
Description copied from interface: ClusterProperties
Sets the given property.

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

Specified by:
setProperty in interface ClusterProperties
Parameters:
key - the property key
value - the string to set the property to


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