Class ReferenceCountingMap.Instance<V extends Closeable>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int refCount  
      (package private) V value  
    • Constructor Summary

      Constructors 
      Constructor Description
      Instance​(V value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) V acquire()
      Increment refCount and acquire a reference to value.
      (package private) boolean release()
      Decrement refCount and return true if it has reached 0.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • refCount

        private int refCount
    • Constructor Detail

      • Instance

        Instance​(V value)
    • Method Detail

      • acquire

        V acquire()
        Increment refCount and acquire a reference to value.
      • release

        boolean release()
        Decrement refCount and return true if it has reached 0.