OffHeap Store is a library that provides a set of map and cache implementations that store data outside of the normal Java heap. Additionally it provides a bunch of interesting things to support these functions that might be interesting in isolation to some people.
Licensed under the Apache License, Version 2.0
© Terracotta, Inc., a Software AG company
© Super iPaaS Integration LLC, an IBM Company 2024
See also: http://www.github.com/ehcache/ehcache3
On the surface OffHeap Store contains implementations of:
-
Map (non thread-safe)
-
ConcurrentMap (single stripe or segmented; read-write locked or exclusively locked)
-
Set (but use Collections.newSetFromMap(Map) instead)
-
Clock Cache (single stripe or segmented; read-write locked or exclusively locked)
Additional functionality includes:
-
Cache Entry Pinning
-
Eviction Listeners
-
Non-fault tolerant disk backend
Things that might be interesting to some:
-
Per entry metadata (very basic API)
-
Serialization optimization (redundant ObjectStreamClass descriptor compression)
-
Native heap-alike implementation (OffHeapStorageArea)
-
A (crude) weak identity hash map (because the world needed one more)
Like all software OffHeap Store is just a big stack of abstractions, rough structure starting at the bottom and working up.
BufferSource |
ByteBuffer factories [org.terracotta.offheapstore.buffersource] |
PageSource |
Page factories, that uses ByteBuffers) [org.terracotta.offheapstore.paging] |
OffHeapStorageArea |
native heap-alike that uses pages) |
StorageEngine |
provide storage for POJOs, some use OffHeapStorageArea) |
OffHeapHashMap |
core map implementation, uses storage engine for K/V storage and a page for the hashtable. |
a million subclasses |
all the map derivatives: concurrent, evicting (caches), et al. |