Module openj9.dtfj

Class Pool<StructType extends DataType>

    • Field Detail

      • pool

        protected com.ibm.j9ddr.vm29.pointer.generated.J9PoolPointer pool
      • elementSize

        protected long elementSize
      • logger

        protected static final Logger logger
    • Method Detail

      • fromJ9Pool

        public static <T extends DataTypePool<T> fromJ9Pool​(com.ibm.j9ddr.vm29.pointer.generated.J9PoolPointer structure,
                                                              Class<T> structType)
                                                       throws CorruptDataException
        Factory method to construct an appropriate pool handler.
        Type Parameters:
        T -
        Parameters:
        structure - the J9Pool structure to use
        Returns:
        an instance of Pool
        Throws:
        CorruptDataException
      • numElements

        public abstract long numElements()
        Returns the number of elements in a given pool.
        Returns:
        the number of elements in the pool
      • capacity

        public abstract long capacity()
        Returns the total capacity of a pool
        Returns:
        the capacity of the pool
      • includesElement

        public abstract boolean includesElement​(StructType anElement)
        See if an element is currently allocated from a pool.
        Returns:
        boolean - true if the element is allocated, false otherwise
      • iterator

        public abstract SlotIterator<StructType> iterator()
        Returns an iterator over the elements in the pool
        Returns:
        an Iterator