org.fusesource.hawtdb.api
Interface PagedAccessor<T>

Type Parameters:
T -
All Known Implementing Classes:
AbstractStreamPagedAccessor, CodecPagedAccessor

public interface PagedAccessor<T>

Encodes objects to a page file and decodes them from a page file.

Author:
Hiram Chirino

Method Summary
 T load(Paged paged, int page)
          Load a value from a specified page.
 java.util.List<java.lang.Integer> pagesLinked(Paged paged, int page)
          Returns a list of the pages linked to the specified page.
 java.util.List<java.lang.Integer> store(Paged paged, int page, T value)
          Store a value at the specified page.
 

Method Detail

store

java.util.List<java.lang.Integer> store(Paged paged,
                                        int page,
                                        T value)
Store a value at the specified page. Object encoding will be deferred as long as possible. This allows multiple updates the the same page to avoid paying the cost of multiple encoding passes. Only when the value is evicted from the cache or the page file is flushed, will the encoding take place. Since the deferred encoding is no longer taking place in the context of a transaction, there are several restrictions of what pages the Marshaler can update so that transaction isolation is not violated:

Parameters:
paged -
page -
value -
Returns:
a list of any pages allocated by the method.

load

T load(Paged paged,
       int page)
Load a value from a specified page. It should not attempt do any update operations against the Paged object.

Parameters:
paged -
page -
Returns:

pagesLinked

java.util.List<java.lang.Integer> pagesLinked(Paged paged,
                                              int page)
Returns a list of the pages linked to the specified page.

Parameters:
paged -
page -


Copyright © 2009-2011 FuseSource, Corp.. All Rights Reserved.