mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
https://github.com/OpenHFT/Chronicle-Map/issues/265 added max bloat factor
This commit is contained in:
@@ -237,5 +237,23 @@ public interface ChronicleMap<K, V> extends ConcurrentMap<K, V>,
|
||||
default int remainingAutoResizes() {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The maximum number of times, the chronicle map is allowed to grow in size beyond
|
||||
* the configured number of entries.
|
||||
* <p>
|
||||
* <p>The default maximum bloat factor factor is {@code 1.0} - i. e. "no bloat is expected".
|
||||
* <p>
|
||||
* <p>It is strongly advised not to configure {@code maxBloatFactor} to more than {@code 10.0},
|
||||
* almost certainly, you either should configure {@code ChronicleHash}es completely differently,
|
||||
* or this data store doesn't fit to your case.
|
||||
*
|
||||
* @return maxBloatFactor the maximum number ot times, the chronicle map is alowed to be resized
|
||||
*/
|
||||
default double maxBloatFactor() {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -280,6 +280,11 @@ public class VanillaChronicleMap<K, V, R>
|
||||
return (int) (maxTiers() - tiersUsed());
|
||||
}
|
||||
|
||||
@Override
|
||||
public double maxBloatFactor() {
|
||||
return maxBloatFactor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short percentageFreeSpace() {
|
||||
throwExceptionIfClosed();
|
||||
|
||||
Reference in New Issue
Block a user