Child pages
  • HashMap Recipe
Skip to end of metadata
Go to start of metadata

About Terracotta Documentation


This documentation is about Terracotta DSO, an advanced distributed-computing technology aimed at meeting special clustering requirements.

Terracotta products without the overhead and complexity of DSO meet the needs of almost all use cases and clustering requirements. To learn how to migrate from Terracotta DSO to standard Terracotta products, see Migrating From Terracotta DSO. To find documentation on non-DSO (standard) Terracotta products, see Terracotta Documentation. Terracotta release information, such as release notes and platform compatibility, is found in Product Information.

Release: 3.6
Publish Date: November, 2011

Documentation Archive »

This example shows how to cluster a Map using Terracotta. Note that the map used in this example is a java.util.HashMap. As in
standard Java, the HashMap structure in Terracotta is not automatically locked, and requires external synchronization.

For an automatically locked Map, use for example java.util.concurrent.ConcurrentHashMa. For production code, the Terracotta Toolkit provides a fully locked, highly concurrent, automatically distributed (shared) map.

The following items are required to run the HashMap example:

How to run

A Terracotta Server instance is always required to run Terracotta. dso-java(.sh|.bat) is a wrapper script that adds Terracotta to standard java. After the Terracotta server is running, start the two nodes:

Node 1:

Node 2:

The Main Class


  • No labels