Class TcConfigHolder
- java.lang.Object
-
- org.terracotta.angela.common.tcconfig.holders.TcConfigHolder
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TcConfig10Holder,TcConfig8Holder,TcConfig9Holder
public abstract class TcConfigHolder extends Object implements Serializable
This holds the contents of the Tc Config It is subcassed into versions- Author:
- Aurelien Broszniowski
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceTcConfigHolder.XmlModifier
-
Field Summary
Fields Modifier and Type Field Description protected StringtcConfigContent
-
Constructor Summary
Constructors Constructor Description TcConfigHolder()TcConfigHolder(InputStream tcConfigInputStream)TcConfigHolder(TcConfigHolder tcConfigHolder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddDataDirectory(List<TsaStripeConfig.TsaDataDirectory> tsaDataDirectoryList)abstract voidaddOffheap(String resourceName, String size, String unit)abstract voidaddPersistencePlugin(String persistenceDataName)voidaddServer(int stripeIndex, String hostname)voidcreateOrUpdateTcProperty(String name, String value)abstract Map<String,String>getDataDirectories()List<String>getLogsLocation()protected intgetOrAllocate(String portName, Node serverNode, int idx, XPath xPath, PortAllocator portAllocator)abstract List<String>getPluginServices()List<TerracottaServer>getServers()protected abstract NodeListgetServersList(Document tcConfigXml, XPath xPath)StringgetTcConfigContent()StringgetTcConfigPath()voidinitialize(PortAllocator portAllocator, Function<String,Boolean> support)abstract List<TerracottaServer>retrieveGroupMembers(String serverName, boolean updateProxy, PortAllocator portAllocator)abstract Map<ServerSymbolicName,Integer>retrieveTsaPorts(boolean updateForProxy, PortAllocator portAllocator)voidsubstituteToken(String token, String value)abstract voidupdateAuditDirectoryLocation(File kitDir, int stripeId)abstract voidupdateDataDirectory(String rootId, String newlocation)abstract voidupdateHostname(String serverName, String hostname)voidupdateLogsLocation(File kitDir, int stripeId)abstract voidupdateSecurityRootDirectoryLocation(String securityRootDirectory)abstract voidupdateServerGroupPort(Map<ServerSymbolicName,Integer> proxiedPorts)voidupdateServerHost(int serverIndex, String newServerHost)voidupdateServerName(int serverIndex, String newServerName)voidupdateServerPort(int serverIndex, String portName, int port)abstract voidupdateServerTsaPort(Map<ServerSymbolicName,Integer> proxiedPorts)voidwriteTcConfigFile(File kitDir, String tcConfigFilename)
-
-
-
Field Detail
-
tcConfigContent
protected volatile String tcConfigContent
-
-
Constructor Detail
-
TcConfigHolder
public TcConfigHolder()
-
TcConfigHolder
public TcConfigHolder(TcConfigHolder tcConfigHolder)
-
TcConfigHolder
public TcConfigHolder(InputStream tcConfigInputStream)
-
-
Method Detail
-
getServersList
protected abstract NodeList getServersList(Document tcConfigXml, XPath xPath) throws XPathExpressionException
- Throws:
XPathExpressionException
-
initialize
public void initialize(PortAllocator portAllocator, Function<String,Boolean> support)
-
getOrAllocate
protected int getOrAllocate(String portName, Node serverNode, int idx, XPath xPath, PortAllocator portAllocator) throws XPathExpressionException
- Throws:
XPathExpressionException
-
getServers
public List<TerracottaServer> getServers()
-
getTcConfigContent
public String getTcConfigContent()
-
getTcConfigPath
public String getTcConfigPath()
-
updateLogsLocation
public void updateLogsLocation(File kitDir, int stripeId)
-
updateServerHost
public void updateServerHost(int serverIndex, String newServerHost)
-
updateServerName
public void updateServerName(int serverIndex, String newServerName)
-
updateServerPort
public void updateServerPort(int serverIndex, String portName, int port)
-
addServer
public void addServer(int stripeIndex, String hostname)
-
updateSecurityRootDirectoryLocation
public abstract void updateSecurityRootDirectoryLocation(String securityRootDirectory)
-
updateAuditDirectoryLocation
public abstract void updateAuditDirectoryLocation(File kitDir, int stripeId)
-
retrieveGroupMembers
public abstract List<TerracottaServer> retrieveGroupMembers(String serverName, boolean updateProxy, PortAllocator portAllocator)
-
updateServerGroupPort
public abstract void updateServerGroupPort(Map<ServerSymbolicName,Integer> proxiedPorts)
-
updateServerTsaPort
public abstract void updateServerTsaPort(Map<ServerSymbolicName,Integer> proxiedPorts)
-
retrieveTsaPorts
public abstract Map<ServerSymbolicName,Integer> retrieveTsaPorts(boolean updateForProxy, PortAllocator portAllocator)
-
addDataDirectory
public abstract void addDataDirectory(List<TsaStripeConfig.TsaDataDirectory> tsaDataDirectoryList)
-
addPersistencePlugin
public abstract void addPersistencePlugin(String persistenceDataName)
-
-