BigMemory Go 4.3.4 | Code Samples | Example: Programmatic Configuration
Example: Programmatic Configuration
Note: The following description focuses on code snippets from the full code example, which is available at the /code-samples/src/ location in the installed product kit.
To configure BigMemory Go programmatically, use the Ehcache fluent configuration API at
Configuration managerConfiguration = new Configuration()
.cache(new CacheConfiguration()
.maxBytesLocalHeap(512, MemoryUnit.MEGABYTES)
.maxBytesLocalOffHeap(1, MemoryUnit.GIGABYTES)
CacheManager manager = CacheManager.create(managerConfiguration);
try {
Cache bigMemory = manager.getCache("BigMemory");
// now do stuff with it...
} finally {
if (manager != null) manager.shutdown();

Copyright © 2010 - 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release