Class LinkedArrayQueueUtil


  • public final class LinkedArrayQueueUtil
    extends Object
    This is used for method substitution in the LinkedArray classes code generation.
    • Constructor Detail

      • LinkedArrayQueueUtil

        public LinkedArrayQueueUtil()
    • Method Detail

      • length

        public static int length​(Object[] buf)
      • modifiedCalcCircularRefElementOffset

        public static long modifiedCalcCircularRefElementOffset​(long index,
                                                                long mask)
        This method assumes index is actually (index << 1) because lower bit is used for resize. This is compensated for by reducing the element shift. The computation is constant folded, so there's no cost.
      • nextArrayOffset

        public static long nextArrayOffset​(Object[] curr)