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 String
deserializeKey
(byte[] bytes) protected T
deserializeValue
(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:
serializeKey
in classAbstractOffHeapCache<String,
T extends AtlanObject>
-
deserializeKey
- Specified by:
deserializeKey
in classAbstractOffHeapCache<String,
T extends AtlanObject>
-
serializeValue
- Specified by:
serializeValue
in classAbstractOffHeapCache<String,
T extends AtlanObject>
-
deserializeValue
- Specified by:
deserializeValue
in classAbstractOffHeapCache<String,
T extends AtlanObject>
-