Class ConcurrentCleaner


  • @InternalUseOnly
    public class ConcurrentCleaner
    extends java.lang.Object
    Optimized for multithreaded use of the Java 9+ Cleaner
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.ref.Cleaner[] cleaner  
      private static int mask  
      private static int MAX  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static int getIndex​(java.lang.Thread key)  
      private static java.lang.ref.Cleaner instantiateCleaner​(int index)  
      private static int powerOfTwoSize​(int initialSize)  
      java.lang.ref.Cleaner.Cleanable register​(java.lang.Object obj, java.lang.Runnable action)  
      • Methods inherited from class java.lang.Object

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

      • cleaner

        private static final java.lang.ref.Cleaner[] cleaner
      • mask

        private static final int mask
    • Constructor Detail

      • ConcurrentCleaner

        public ConcurrentCleaner()
    • Method Detail

      • powerOfTwoSize

        private static int powerOfTwoSize​(int initialSize)
      • getIndex

        static int getIndex​(java.lang.Thread key)
      • register

        public java.lang.ref.Cleaner.Cleanable register​(java.lang.Object obj,
                                                        java.lang.Runnable action)
      • instantiateCleaner

        private static java.lang.ref.Cleaner instantiateCleaner​(int index)