Package elki.persistent
Class LRUCachePageFileFactory<P extends Page>
- java.lang.Object
-
- elki.persistent.LRUCachePageFileFactory<P>
-
- Type Parameters:
P
- Page type
- All Implemented Interfaces:
PageFileFactory<P>
public class LRUCachePageFileFactory<P extends Page> extends java.lang.Object implements PageFileFactory<P>
Page file factory for memory page files.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LRUCachePageFileFactory.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private int
cacheSize
Cache size, in bytes.private PageFileFactory<P>
pageFileFactory
Inner page file factory.
-
Constructor Summary
Constructors Constructor Description LRUCachePageFileFactory(PageFileFactory<P> pageFileFactory, int cacheSize)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPageSize()
Query the page size.PageFile<P>
newPageFile(java.lang.Class<P> cls)
Make a new page file.
-
-
-
Field Detail
-
pageFileFactory
private PageFileFactory<P extends Page> pageFileFactory
Inner page file factory.
-
cacheSize
private int cacheSize
Cache size, in bytes.
-
-
Constructor Detail
-
LRUCachePageFileFactory
public LRUCachePageFileFactory(PageFileFactory<P> pageFileFactory, int cacheSize)
Constructor.- Parameters:
pageFileFactory
- Inner page filecacheSize
- Size of cache, in bytes.
-
-
Method Detail
-
newPageFile
public PageFile<P> newPageFile(java.lang.Class<P> cls)
Description copied from interface:PageFileFactory
Make a new page file.- Specified by:
newPageFile
in interfacePageFileFactory<P extends Page>
- Parameters:
cls
- Page class- Returns:
- Page file
-
getPageSize
public int getPageSize()
Description copied from interface:PageFileFactory
Query the page size.- Specified by:
getPageSize
in interfacePageFileFactory<P extends Page>
- Returns:
- page size
-
-