protected abstract static class RecencyEvictor.ProtectedBuilder<B extends RecencyEvictor.ProtectedBuilder<B>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
capacity_ |
static int |
DEFAULT_CAPACITY |
static double |
DEFAULT_LOAD_FACTOR |
protected double |
loadFactor_ |
| Modifier | Constructor and Description |
|---|---|
protected |
ProtectedBuilder() |
| Modifier and Type | Method and Description |
|---|---|
<E> Evictor<E> |
build() |
B |
capacity(int capacity)
When the provided capacity is exceeded, elements will be evicted.
|
protected abstract B |
convertThis() |
B |
loadFactor(double loadFactor)
Load factor is the proportion of the capacity that should be achieved
when evicting.
|
public static final int DEFAULT_CAPACITY
public static final double DEFAULT_LOAD_FACTOR
protected int capacity_
protected double loadFactor_
public B capacity(int capacity) throws IllegalArgumentException
If not called, capacity defaults to DEFAULT_CAPACITY.
capacity - The capacity of the evictor.IllegalArgumentException - When the argument is negative.public B loadFactor(double loadFactor) throws IllegalArgumentException
If not called, load factor defaults to DEFAULT_LOAD_FACTOR.
loadFactor - The load factor of this evictor.IllegalArgumentException - When the argument is not between 0 and 1 inclusive.public <E> Evictor<E> build()
protected abstract B convertThis()
Copyright © 2011–2024 Live Ontologies Project. All rights reserved.