Java implementation of the language-neutral FlossWare Memory storage contract.
RamMemoryStore: process-local, ephemeral storage.FileSystemMemoryStore: one UTF-8 payload per file, with encoded IDs and atomic replacement where supported.DecoratingMemoryStore: base class for composable store decorators.RamCacheMemoryStore: read-through/write-through RAM cache around anyMemoryStore.
The filesystem implementation is intended for single-process use. The delegate remains authoritative when wrapped by the RAM cache; changes made directly to the delegate are not observed by an existing cache. The outermost decorator owns and closes its delegate.
MemoryStore store = new RamCacheMemoryStore(
new FileSystemMemoryStore(Path.of("./memory-data"))
);
try (store) {
store.put("session-1", "remember this");
String value = store.get("session-1").orElseThrow();
}Requires Java 17+. Run tests with mvn test.
The shared architecture and REST contract belong in FlossWare/memory.