I'm using ehcache to persist data on the disk for JVM restarts. Since the data is very big, I want to try the BigMemory Go product. But in their documentation I did not find any mention of disk configuration (max size, path). With ehcache my configuration look like this:
PersistentCacheManager persistentCacheManager =
newCacheManagerBuilder()
.with(persistence(new File("path_to_cache_dest"))
.withCache("myType"), newCacheConfigurationBuilder(String.class, String.class, newResourcePoolsBuilder()
.disk(2, MemoryUnit.GB, true))
.build(true);
What is the equivalent in BigMemory Go? What is the object dealing with disk persistence in BigMemory? A code sample would be great.
BigMemory Go is a commercial product based on Ehcache 2.x. It is thus unrelated to Ehcache 3.x as it uses a different code base and different APIs.
So you would need to configure Ehcache 2.x for disk persistence and then run that configuration with the commercial version which would then use the commercial disk store:
Note that the above would still work in open source if you were to replace
Strategy.LOCALRESTARTABLEwithStrategy.LOCALTEMPSWAP. You would only loose the crash proof restartability and use a different disk storage model.