Package com.atlan.cache
Class OffHeapFailureCache
java.lang.Object
com.atlan.cache.AbstractOffHeapCache<String,AssetBatch.FailedBatch>
com.atlan.cache.OffHeapFailureCache
- All Implemented Interfaces:
AtlanCloseable
,AutoCloseable
Generic class through which to cache any batch failures efficiently, off-heap, to avoid risking extreme
memory usage.
-
Constructor Summary
ConstructorsConstructorDescriptionOffHeapFailureCache
(AtlanClient client, String name) Construct new cache for failures. -
Method Summary
Modifier and TypeMethodDescriptiondeserializeKey
(byte[] bytes) deserializeValue
(byte[] bytes) void
extendedWith
(OffHeapFailureCache other, boolean closeOriginal) Extend this cache with all the entries from the provided cache.byte[]
serializeKey
(String key) byte[]
Methods inherited from class com.atlan.cache.AbstractOffHeapCache
close, containsKey, entrySet, get, getName, getSize, isEmpty, isNotClosed, isNotEmpty, put, putAll, size, values
-
Constructor Details
-
OffHeapFailureCache
Construct new cache for failures.- Parameters:
client
- connectivity to the Atlan tenantname
- to distinguish which cache is which
-
-
Method Details
-
serializeKey
- Specified by:
serializeKey
in classAbstractOffHeapCache<String,
AssetBatch.FailedBatch>
-
deserializeKey
- Specified by:
deserializeKey
in classAbstractOffHeapCache<String,
AssetBatch.FailedBatch>
-
serializeValue
- Specified by:
serializeValue
in classAbstractOffHeapCache<String,
AssetBatch.FailedBatch>
-
deserializeValue
- Specified by:
deserializeValue
in classAbstractOffHeapCache<String,
AssetBatch.FailedBatch>
-
extendedWith
Extend this cache with all the entries from the provided cache.- Parameters:
closeOriginal
- if true, close the provided cache after the extension is completeother
- other cache with which to extend this one
-