Class ReferenceTrackingProxy<R,T extends Closeable>

java.lang.Object
io.confluent.telemetry.exporter.ReferenceTrackingProxy<R,T>
All Implemented Interfaces:
InvocationHandler

public class ReferenceTrackingProxy<R,T extends Closeable> extends Object implements InvocationHandler
A proxy class that wraps a closeable resource and keeps track of the number of references to it. The producer is closed when the reference count reaches zero.