Class LeakDetector<T>

    • Constructor Detail

      • LeakDetector

        public LeakDetector()
        Deprecated.
    • Method Detail

      • acquired

        public boolean acquired​(T resource)
        Deprecated.
        Tracks the resource as been acquired.
        Parameters:
        resource - the resource that has been acquired
        Returns:
        true whether the resource has been acquired normally, false if the resource has detected a leak (meaning that another acquire occurred before a release of the same resource)
        See Also:
        released(Object)
      • released

        public boolean released​(T resource)
        Deprecated.
        Tracks the resource as been released.
        Parameters:
        resource - the resource that has been released
        Returns:
        true whether the resource has been released normally (based on a previous acquire). false if the resource has been released without a prior acquire (such as a double release scenario)
        See Also:
        acquired(Object)
      • id

        public String id​(T resource)
        Deprecated.
        Generates a unique ID for the given resource.
        Parameters:
        resource - the resource to generate the unique ID for
        Returns:
        the unique ID of the given resource
      • run

        public void run()
        Deprecated.
        Specified by:
        run in interface Runnable