Terracotta 10.7 | Ehcache API Developer Guide | Fast Restartability | Creating Restartable Resource Pools
 
Creating Restartable Resource Pools
Let us do a quick recap of restartability:
*A restartable server enables you to have restartable objects on the server.
*A restartable CacheManager makes the cache configuration restartable.
*A restartable resource pool configuration makes your cache data restartable.
As with non-restartable resource pools, restartable resource pools can be dedicated or shared. See Clustering Concepts for a refresher on resource pools.

ClusteredResourcePool restartableDedicatedPool =
ClusteredRestartableResourcePoolBuilder
.clusteredRestartableDedicated(
"primary-server-resource", 4, MemoryUnit.MB); // 1

ClusteredResourcePool restartableSharedPool =
ClusteredRestartableResourcePoolBuilder
.clusteredRestartableShared("shared-pool"); // 2
1
ClusteredRestartableResourcePoolBuilder's static method clusteredRestartableDedicated(String, long, MemoryUnit) configures a restartable dedicated pool of size 4 MB from the server's primary-server-resource. As the name suggests, this pool will be dedicated to the Cache using it.
2
ClusteredRestartableResourcePoolBuilder's static method clusteredRestartableShared(String) specifies a restartable shared pool with the name shared-pool. This pool can be shared by multiple caches, and no cache can exclusively reserve this pool for its sole use.