ehcache

net.sf.ehcache.config
Class TerracottaClientConfiguration

java.lang.Object
  extended by net.sf.ehcache.config.TerracottaClientConfiguration
All Implemented Interfaces:
Cloneable

public class TerracottaClientConfiguration
extends Object
implements Cloneable

Holds the Terracotta configuration for a particular client

Author:
amiller@terracotta.org, Abhishek Sanoujam

Field Summary
static boolean DEFAULT_REJOIN_VALUE
          Default value of rejoin attribute
static boolean DEFAULT_WAN_ENABLED_TSA_VALUE
          Default value for whether WAN replication enabled or not
 
Constructor Summary
TerracottaClientConfiguration()
           
 
Method Summary
 TerracottaClientConfiguration clone()
          Clones this object, following the usual contract.
 void extractTcconfig(String text)
          Tell the BeanHandler to extract the entire subtree xml as text at element .
 void freezeConfig()
          Freezes the config
 String getEmbeddedConfig()
          Get the embedded config read as
 String getOriginalEmbeddedConfig()
          Get the original embedded config
 String getUrl()
          Get url string
 boolean isRejoin()
          Returns true if rejoin is enabled
 boolean isUrlConfig()
          Helper to check whether this is url config or embedded config
 boolean isWanEnabledTSA()
          Returns true if it is a WAN enabled TSA
 TerracottaClientConfiguration rejoin(boolean rejoin)
          Builder method to set rejoin
 void setRejoin(boolean rejoin)
          Set rejoin value
 void setUrl(String url)
          Set url
 void setWanEnabledTSA(boolean wanEnabledTSA)
          Set wanEnabledTSA value
 TerracottaClientConfiguration url(String url)
          Builder method to set the URL.
 TerracottaClientConfiguration url(String host, String port)
          Builder method to set the URL for a host and a port.
 TerracottaClientConfiguration wanEnabledTSA(boolean wanEnabledTSA)
          Builder method to set wanEnabledTSA
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REJOIN_VALUE

public static final boolean DEFAULT_REJOIN_VALUE
Default value of rejoin attribute

See Also:
Constant Field Values

DEFAULT_WAN_ENABLED_TSA_VALUE

public static final boolean DEFAULT_WAN_ENABLED_TSA_VALUE
Default value for whether WAN replication enabled or not

See Also:
Constant Field Values
Constructor Detail

TerracottaClientConfiguration

public TerracottaClientConfiguration()
Method Detail

clone

public TerracottaClientConfiguration clone()
                                    throws CloneNotSupportedException
Clones this object, following the usual contract.

Overrides:
clone in class Object
Returns:
a copy, which independent other than configurations than cannot change.
Throws:
CloneNotSupportedException

url

public final TerracottaClientConfiguration url(String url)
Builder method to set the URL.

Parameters:
url - the URL to set
Returns:
this configuration instance

url

public final TerracottaClientConfiguration url(String host,
                                               String port)
Builder method to set the URL for a host and a port.

Parameters:
host - the host where to get the Terracotta configuration from
port - the port on that host
Returns:
this configuration instance

setUrl

public final void setUrl(String url)
Set url


getUrl

public final String getUrl()
Get url string


extractTcconfig

public final void extractTcconfig(String text)
Tell the BeanHandler to extract the entire subtree xml as text at element . Expects to receive the contents of the tag and will wrap it in a proper tc-config header / footer.


getEmbeddedConfig

public final String getEmbeddedConfig()
Get the embedded config read as


getOriginalEmbeddedConfig

public final String getOriginalEmbeddedConfig()
Get the original embedded config

Returns:
original embedded config

isUrlConfig

public final boolean isUrlConfig()
Helper to check whether this is url config or embedded config


isRejoin

public boolean isRejoin()
Returns true if rejoin is enabled

Returns:
the rejoin

setRejoin

public void setRejoin(boolean rejoin)
Set rejoin value

Parameters:
rejoin - the rejoin to set

rejoin

public TerracottaClientConfiguration rejoin(boolean rejoin)
Builder method to set rejoin

Parameters:
rejoin -
Returns:
this instance

isWanEnabledTSA

public boolean isWanEnabledTSA()
Returns true if it is a WAN enabled TSA

Returns:
wanEnabledTSA

setWanEnabledTSA

public void setWanEnabledTSA(boolean wanEnabledTSA)
Set wanEnabledTSA value

Parameters:
wanEnabledTSA -

wanEnabledTSA

public TerracottaClientConfiguration wanEnabledTSA(boolean wanEnabledTSA)
Builder method to set wanEnabledTSA

Parameters:
wanEnabledTSA -
Returns:
this instance

freezeConfig

public void freezeConfig()
Freezes the config


ehcache

Copyright 2001-2017, Terracotta, Inc.