public interface Paged
Modifier and Type | Interface and Description |
---|---|
static class |
Paged.SliceType |
Modifier and Type | Method and Description |
---|---|
int |
alloc()
does the same as allocator().alloc(1)
|
Allocator |
allocator() |
<T> void |
clear(PagedAccessor<T> pagedAccessor,
int page)
Frees any pages associated with the value stored at the given page if any.
|
void |
flush() |
void |
free(int page)
does the same as allocator().free(page, 1)
|
<T> T |
get(PagedAccessor<T> pagedAccessor,
int page)
Gets an object previously put at the given page.
|
int |
getPageSize() |
int |
pages(int length) |
<T> void |
put(PagedAccessor<T> pagedAccessor,
int page,
T value)
Put an object at a given page.
|
void |
read(int pageId,
org.fusesource.hawtbuf.Buffer buffer)
Copies the contents of a page into the buffer space.
|
ByteBuffer |
slice(Paged.SliceType mode,
int pageId,
int count)
Provides direct access to the memory associated with a page.
|
void |
unslice(ByteBuffer buffer) |
void |
write(int pageId,
org.fusesource.hawtbuf.Buffer buffer)
Copies the buffer into the page.
|
Allocator allocator()
int alloc()
void free(int page)
ByteBuffer slice(Paged.SliceType mode, int pageId, int count) throws IOPagingException
mode
- how will the buffer be used.pageId
- the starting page of the buffercount
- the number of pages to include in the buffer.IOPagingException
void unslice(ByteBuffer buffer)
void read(int pageId, org.fusesource.hawtbuf.Buffer buffer)
pageId
- buffer
- void write(int pageId, org.fusesource.hawtbuf.Buffer buffer)
pageId
- buffer
- int getPageSize()
int pages(int length)
void flush()
<T> T get(PagedAccessor<T> pagedAccessor, int page)
page
- <T> void put(PagedAccessor<T> pagedAccessor, int page, T value)
page
- value
- <T> void clear(PagedAccessor<T> pagedAccessor, int page)
page
- Copyright © 2009–2016 FuseSource, Corp.. All rights reserved.