Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
TerracottaClientConfiguration() |
Modifier and Type | Method and Description |
---|---|
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
<tc-config/> . |
void |
freezeConfig()
Freezes the config
|
String |
getEmbeddedConfig()
Get the embedded config read as
<tc-config/> |
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
|
public static final boolean DEFAULT_REJOIN_VALUE
public static final boolean DEFAULT_WAN_ENABLED_TSA_VALUE
public TerracottaClientConfiguration clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public final TerracottaClientConfiguration url(String url)
url
- the URL to setpublic final TerracottaClientConfiguration url(String host, String port)
host
- the host where to get the Terracotta configuration fromport
- the port on that hostpublic final void setUrl(String url)
public final String getUrl()
public final void extractTcconfig(String text)
<tc-config/>
. Expects
to receive the contents of the<tc-config/>
tag and will wrap it in a proper tc-config header / footer.public final String getEmbeddedConfig()
<tc-config/>
public final String getOriginalEmbeddedConfig()
public final boolean isUrlConfig()
public boolean isRejoin()
public void setRejoin(boolean rejoin)
rejoin
- the rejoin to setpublic TerracottaClientConfiguration rejoin(boolean rejoin)
rejoin
- public boolean isWanEnabledTSA()
public void setWanEnabledTSA(boolean wanEnabledTSA)
wanEnabledTSA
- public TerracottaClientConfiguration wanEnabledTSA(boolean wanEnabledTSA)
wanEnabledTSA
- public void freezeConfig()
Copyright 2001-2018, Terracotta, Inc.