public class CachePolicy
extends java.lang.Object
Constructor and Description |
---|
CachePolicy() |
Modifier and Type | Method and Description |
---|---|
boolean |
areWindowsCompatible(double windowA,
double windowB)
Calculates the percentage difference between the windows and sees if it's acceptable according to the set threshold (default 10%).
|
long |
getBucketSortFrequency()
Returns the time, in milliseconds, between potential sorts of the cache buckets.
|
double |
getCompatibleWindowThreashold()
Returns the % diff that window sizes are allowed to be off in order to match.
|
long |
getMaxCacheSizeBytes()
The maximum size of the cache, in bytes.
|
void |
setBucketSortFrequency(long bucketSortFrequency) |
void |
setCompatibleWindowThreashold(double compatibleWindowThreashold) |
void |
setMaxCacheSizeBytes(long value) |
public double getCompatibleWindowThreashold()
public void setCompatibleWindowThreashold(double compatibleWindowThreashold)
public boolean areWindowsCompatible(double windowA, double windowB)
public long getBucketSortFrequency()
public void setBucketSortFrequency(long bucketSortFrequency)
public long getMaxCacheSizeBytes()
public void setMaxCacheSizeBytes(long value)