Class LookupCacheManager.RefCountedCache
- java.lang.Object
-
- org.apache.flink.table.runtime.functions.table.lookup.LookupCacheManager.RefCountedCache
-
- All Implemented Interfaces:
RefCounted
- Enclosing class:
- LookupCacheManager
@NotThreadSafe @VisibleForTesting public static class LookupCacheManager.RefCountedCache extends Object implements RefCounted
A wrapper class ofLookupCache
which also tracks the reference count of it.This class is exposed as public for testing purpose and not thread safe. Concurrent accesses should be guarded by synchronized methods provided by
LookupCacheManager
.
-
-
Constructor Summary
Constructors Constructor Description RefCountedCache(LookupCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LookupCache
getCache()
boolean
release()
Decreases the reference counter.void
retain()
Increases the reference counter.
-
-
-
Constructor Detail
-
RefCountedCache
public RefCountedCache(LookupCache cache)
-
-
Method Detail
-
retain
public void retain()
Description copied from interface:RefCounted
Increases the reference counter.- Specified by:
retain
in interfaceRefCounted
-
release
public boolean release()
Description copied from interface:RefCounted
Decreases the reference counter.- Specified by:
release
in interfaceRefCounted
- Returns:
true
if the reference counter reached 0,false
otherwise.
-
getCache
public LookupCache getCache()
-
-