Package com.atlan.cache
Class OffHeapObjectCache<T extends AtlanObject>
- All Implemented Interfaces:
AtlanCloseable,AutoCloseable
- Direct Known Subclasses:
OffHeapAssetCache
Generic class through which to cache any objects efficiently, off-heap, to avoid risking extreme
memory usage.
-
Constructor Summary
ConstructorsConstructorDescriptionOffHeapObjectCache(AtlanClient client, String name) Construct new object cache. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdeserializeKey(byte[] bytes) protected TdeserializeValue(byte[] bytes) protected byte[]serializeKey(String key) protected byte[]serializeValue(T value) Methods inherited from class com.atlan.cache.AbstractOffHeapCache
close, containsKey, entrySet, get, getName, getSize, isEmpty, isNotClosed, isNotEmpty, put, putAll, size, values
-
Constructor Details
-
OffHeapObjectCache
Construct new object cache.- Parameters:
client- connectivity to the Atlan tenantname- to distinguish which cache is which
-
-
Method Details
-
serializeKey
- Specified by:
serializeKeyin classAbstractOffHeapCache<String,T extends AtlanObject>
-
deserializeKey
- Specified by:
deserializeKeyin classAbstractOffHeapCache<String,T extends AtlanObject>
-
serializeValue
- Specified by:
serializeValuein classAbstractOffHeapCache<String,T extends AtlanObject>
-
deserializeValue
- Specified by:
deserializeValuein classAbstractOffHeapCache<String,T extends AtlanObject>
-