|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.helidb.util.bplus.LruCacheNodeRepositoryBuilder<K,V>
K
- V
- public class LruCacheNodeRepositoryBuilder<K,V>
This is a NodeRepositoryBuilder
for building
LruCacheNodeRepository
objects. It uses a proxied
NodeRepositoryBuilder
to build the caching node repository's proxied
repository.
LruCacheNodeRepository
Field Summary | |
---|---|
static int |
DEFAULT_MAX_CACHE_SIZE
The default maximum size of the cache is 16 nodes. |
Constructor Summary | |
---|---|
LruCacheNodeRepositoryBuilder()
|
Method Summary | |
---|---|
NodeRepository<K> |
create(ReadWritableFile f,
boolean readOnly)
Create the node repository. |
LruCacheNodeRepositoryBuilder<K,V> |
setMaxCacheSize(int i)
Set the maximum cache size measured in the number of cached nodes. |
LruCacheNodeRepositoryBuilder<K,V> |
setProxiedBuilder(NodeRepositoryBuilder<K> proxied)
Set the builder for building the proxied node repository. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_MAX_CACHE_SIZE
Constructor Detail |
---|
public LruCacheNodeRepositoryBuilder()
Method Detail |
---|
public LruCacheNodeRepositoryBuilder<K,V> setProxiedBuilder(NodeRepositoryBuilder<K> proxied)
proxied
- The proxied builder.
this
.public LruCacheNodeRepositoryBuilder<K,V> setMaxCacheSize(int i) throws IllegalArgumentException
i
- The maximum number of cached nodes.
this
.
IllegalArgumentException
- If the cache size is less than 1.public NodeRepository<K> create(ReadWritableFile f, boolean readOnly)
NodeRepositoryBuilder
create
in interface NodeRepositoryBuilder<K>
f
- The file containing the node repository data.readOnly
- Should the repository be read only?
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |