Class Pool<StructType extends DataType>

java.lang.Object
com.ibm.j9ddr.vm29.j9.Pool<StructType>
Direct Known Subclasses:
Pool_29_V0

public abstract class Pool<StructType extends DataType> extends Object
  • Field Details

    • pool

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

      protected Class<StructType extends DataType> structType
    • elementSize

      protected long elementSize
    • logger

      protected static final Logger logger
  • Constructor Details

  • Method Details

    • fromJ9Pool

      public static <T extends DataType> Pool<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
    • fromJ9Pool

      public static <T extends DataType> Pool<T> fromJ9Pool(com.ibm.j9ddr.vm29.pointer.generated.J9PoolPointer structure, Class<T> structType, boolean isInline) throws CorruptDataException
      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