1 | EnterpriseClusteringServiceConfigurationBuilder's static method enterpriseCluster(URI) connects the cache manager to the clustered storage at the URI specified. The sample URI provided in the example points to the clustered storage instance named 'my-application' on the Terracotta server (assuming the server is running on localhost and port 9510). |
2 | restartable(String) accepts a logical data root identifier to specify where the fast restart logs should be stored. The string specified here is a logical name, which should be present in the Terracotta server configuration. The server configuration has a mapping of this logical name to a directory path. Using this API is an absolute MUST to create a restartable CacheManager, in the absence of which the CacheManager will be created as a non-restartable CacheManager. |
3 | CacheManagerBuilder uses serverSideConfigBuilder created in Step 1 above. |
4 | Calling destroy() on the CacheManager will destroy all Caches contained inside the CacheManager, all associated metadata and the CacheManager itself. This can be done to free up resources and to ensure that cache contents don't re-appear on a server restart. |