Class PageAllocator<T>
- java.lang.Object
-
- org.neo4j.graphalgo.core.utils.paged.PageAllocator<T>
-
public abstract class PageAllocator<T> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PageAllocator.Factory<T>
static interface
PageAllocator.PageFactory<T>
-
Constructor Summary
Constructors Constructor Description PageAllocator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract long
bytesPerPage()
abstract T[]
emptyPages()
long
estimateMemoryUsage(long size)
abstract T
newPage()
static <T> PageAllocator.Factory<T>
of(int pageSize, long bytesPerPage, java.util.function.Supplier<T> newPage, T[] emptyPages)
static <T> PageAllocator.Factory<T>
of(int pageSize, long bytesPerPage, PageAllocator.PageFactory<T> newPage, T[] emptyPages)
static <T> PageAllocator.Factory<T>
ofArray(java.lang.Class<T> arrayClass)
static <T> PageAllocator.Factory<T>
ofArray(java.lang.Class<T> arrayClass, int pageSize)
abstract int
pageSize()
-
-
-
Method Detail
-
newPage
public abstract T newPage()
-
pageSize
public abstract int pageSize()
-
emptyPages
public abstract T[] emptyPages()
-
bytesPerPage
public abstract long bytesPerPage()
-
estimateMemoryUsage
public final long estimateMemoryUsage(long size)
-
of
public static <T> PageAllocator.Factory<T> of(int pageSize, long bytesPerPage, java.util.function.Supplier<T> newPage, T[] emptyPages)
-
of
public static <T> PageAllocator.Factory<T> of(int pageSize, long bytesPerPage, PageAllocator.PageFactory<T> newPage, T[] emptyPages)
-
ofArray
public static <T> PageAllocator.Factory<T> ofArray(java.lang.Class<T> arrayClass)
-
ofArray
public static <T> PageAllocator.Factory<T> ofArray(java.lang.Class<T> arrayClass, int pageSize)
-
-