protected abstract static class CapacityBalancingEvictor.ProtectedBuilder<B extends CapacityBalancingEvictor.ProtectedBuilder<B>> extends RecencyEvictor.ProtectedBuilder<B>
| Modifier and Type | Field and Description |
|---|---|
protected double |
balance_ |
protected int |
balanceAfterNRepeatedQueries_ |
static double |
DEFAULT_BALANCE |
static int |
DEFAULT_BALANCE_AFTER_N_REPEATED_QUERIES |
capacity_, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, loadFactor_| Modifier | Constructor and Description |
|---|---|
protected |
ProtectedBuilder() |
| Modifier and Type | Method and Description |
|---|---|
B |
balance(double balance)
Capacity should be set so that this proportion of repeatedly added
elements that should be not evicted.
|
B |
balanceAfterNRepeatedQueries(int balanceAfterNRepeatedQueries)
The capacity is balanced in the intervals of the provided number of
additions.
|
<E> Evictor<E> |
build() |
protected abstract B |
convertThis() |
capacity, loadFactorpublic static final double DEFAULT_BALANCE
public static final int DEFAULT_BALANCE_AFTER_N_REPEATED_QUERIES
protected double balance_
protected int balanceAfterNRepeatedQueries_
public B balance(double balance) throws IllegalArgumentException
If not supplied, defaults to DEFAULT_BALANCE.
balance - the proportion of elements that should be not evictedIllegalArgumentException - When the argument is not between 0 and 1 inclusive.public B balanceAfterNRepeatedQueries(int balanceAfterNRepeatedQueries) throws IllegalArgumentException
If not supplied, defaults to
DEFAULT_BALANCE_AFTER_N_REPEATED_QUERIES.
balanceAfterNRepeatedQueries - the number of repeated queries after which to balance the
capacityIllegalArgumentException - If the value is not positive.public <E> Evictor<E> build()
build in class RecencyEvictor.ProtectedBuilder<B extends CapacityBalancingEvictor.ProtectedBuilder<B>>protected abstract B convertThis()
convertThis in class RecencyEvictor.ProtectedBuilder<B extends CapacityBalancingEvictor.ProtectedBuilder<B>>Copyright © 2011–2024 Live Ontologies Project. All rights reserved.