Package com.linkedin.venice.utils
Class ReferenceCounted<T>
- java.lang.Object
-
- com.linkedin.venice.utils.ReferenceCounted<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ReferenceCounted<T> extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description ReferenceCounted(T object, java.util.function.Consumer<T> deleter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
T
get()
int
getReferenceCount()
void
release()
void
retain()
-
-
-
Method Detail
-
get
public T get()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
retain
public void retain()
-
release
public void release()
-
getReferenceCount
public int getReferenceCount()
-
-