public interface Allocator
Paged resource.| Modifier and Type | Method and Description |
|---|---|
int |
alloc(int count)
Allocates a continuous number of items and returns the position of first item in the sequence.
|
void |
clear()
Frees all previous allocations.
|
void |
free(int firstPage,
int count)
Frees a given number of items at a given position.
|
Ranges |
getFreeRanges() |
int |
getLimit() |
boolean |
isAllocated(int page) |
void |
setFreeRanges(Ranges freeList) |
void |
unfree(int firstPage,
int count)
Undoes a previous free method call.
|
int alloc(int count) throws OutOfSpaceException
OutOfSpaceExceptionvoid free(int firstPage,
int count)
void unfree(int firstPage,
int count)
throws UnsupportedOperationException
UnsupportedOperationException - may be thrown by some allocators.void clear()
throws UnsupportedOperationException
UnsupportedOperationExceptionint getLimit()
boolean isAllocated(int page)
page - void setFreeRanges(Ranges freeList)
Ranges getFreeRanges()
Copyright © 2009–2021 FuseSource, Corp.. All rights reserved.