|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Paged
Implemented by objects which provides block io access to pages on file.
Nested Class Summary | |
---|---|
static class |
Paged.SliceType
|
Method Summary | ||
---|---|---|
int |
alloc()
does the same as allocator().alloc(1) |
|
Allocator |
allocator()
|
|
|
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) |
|
|
get(PagedAccessor<T> pagedAccessor,
int page)
Gets an object previously put at the given page. |
|
int |
getPageSize()
|
|
int |
pages(int length)
|
|
|
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. |
|
java.nio.ByteBuffer |
slice(Paged.SliceType mode,
int pageId,
int count)
Provides direct access to the memory associated with a page. |
|
void |
unslice(java.nio.ByteBuffer buffer)
|
|
void |
write(int pageId,
org.fusesource.hawtbuf.Buffer buffer)
Copies the buffer into the page. |
Method Detail |
---|
Allocator allocator()
int alloc()
void free(int page)
java.nio.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(java.nio.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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |