Starting the Terracotta Server
Information on how to start the
Terracotta Server is contained in the
Terracotta Server Administration Guide. See the section
Starting and Stopping the Terracotta Server for details.
You can start the Terracotta Server with the following configuration. It contains the bare minimum configuration required for the samples in the rest of the document to work.
<?xml version="1.0" encoding="UTF-8"?>
<tc-config xmlns="http://www.terracotta.org/config"
xmlns:ohr="http://www.terracotta.org/config/offheap-resource">
<services>
<service id="resources">
<ohr:offheap-resources>
<ohr:resource name="primary-server-resource"
unit="MB">128</ohr:resource> <!-- 1 -->
<ohr:resource name="secondary-server-resource"
unit="MB">96</ohr:resource> <!-- 2 -->
</ohr:offheap-resources>
</service>
</services>
</tc-config>
The above configuration defines two named server off-heap resources:
1 | An off-heap resource of 128 MB size named "primary-server-resource". |
2 | Another off-heap resource named "secondary-server-resource" with 96 MB capacity. |
The rest of the document explains in detail how you can configure cache managers and caches to consume the server's off-heap resources.