public class PageWindowManager extends Object implements Serializable
The pages are stored inside the file in a cyclic way. Newer pages are placed after older ones, until the maximum file size is reached. After that, the next page is stored in the beginning of the file.
| Modifier and Type | Class and Description |
|---|---|
static class |
PageWindowManager.PageWindow
Public (read only) version of page window.
|
| Constructor and Description |
|---|
PageWindowManager(long maxSize)
Creates a new PageWindowManager.
|
| Modifier and Type | Method and Description |
|---|---|
PageWindowManager.PageWindow |
createPageWindow(int pageId,
int size)
Creates and returns a new page window for given page.
|
List<PageWindowManager.PageWindow> |
getLastPageWindows(int count)
Returns last n saved page windows.
|
PageWindowManager.PageWindow |
getPageWindow(int pageId)
Returns the page window for given page or null if no window was found.
|
int |
getTotalSize()
Returns the size of all saved pages
|
void |
removePage(int pageId)
Removes the page window for given page.
|
public PageWindowManager(long maxSize)
maxSize - maximum page size. After this size is exceeded, the pages will be saved starting
at the beginning of filepublic PageWindowManager.PageWindow createPageWindow(int pageId, int size)
pageId - size - public PageWindowManager.PageWindow getPageWindow(int pageId)
pageId - public void removePage(int pageId)
pageId - public List<PageWindowManager.PageWindow> getLastPageWindows(int count)
count - public int getTotalSize()
Copyright © 2006–2014 Apache Software Foundation. All rights reserved.