- 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 Summary
Fields Modifier and Type Field Description protected long
elementSize
protected static Logger
logger
protected com.ibm.j9ddr.vm29.pointer.generated.J9PoolPointer
pool
protected Class<StructType>
structType
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract long
capacity()
Returns the total capacity of a poolstatic <T extends DataType>
Pool<T>fromJ9Pool(com.ibm.j9ddr.vm29.pointer.generated.J9PoolPointer structure, Class<T> structType)
Factory method to construct an appropriate pool handler.static <T extends DataType>
Pool<T>fromJ9Pool(com.ibm.j9ddr.vm29.pointer.generated.J9PoolPointer structure, Class<T> structType, boolean isInline)
abstract boolean
includesElement(StructType anElement)
See if an element is currently allocated from a pool.abstract SlotIterator<StructType>
iterator()
Returns an iterator over the elements in the poolabstract long
numElements()
Returns the number of elements in a given pool.
-
-
-
Field Detail
-
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 Detail
-
Pool
protected Pool(com.ibm.j9ddr.vm29.pointer.generated.J9PoolPointer structure, Class<T> structType) throws CorruptDataException
- Throws:
CorruptDataException
-
-
Method Detail
-
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
-
-