Class CachePolicy
- java.lang.Object
-
- com.inductiveautomation.ignition.common.sqltags.history.cache.CachePolicy
-
public class CachePolicy extends java.lang.Object
These are the settings for the cache.
-
-
Constructor Summary
Constructors Constructor Description CachePolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
getCompatibleWindowThreashold
public double getCompatibleWindowThreashold()
Returns the % diff that window sizes are allowed to be off in order to match.
-
setCompatibleWindowThreashold
public void setCompatibleWindowThreashold(double compatibleWindowThreashold)
-
areWindowsCompatible
public 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%). Also returns true if both window sizes are 0.
-
getBucketSortFrequency
public long getBucketSortFrequency()
Returns the time, in milliseconds, between potential sorts of the cache buckets. Frequent sorting can help improve the accuracy of the relevancy scores during ejection, but will take more processing time.
-
setBucketSortFrequency
public void setBucketSortFrequency(long bucketSortFrequency)
-
getMaxCacheSizeBytes
public long getMaxCacheSizeBytes()
The maximum size of the cache, in bytes.
-
setMaxCacheSizeBytes
public void setMaxCacheSizeBytes(long value)
-
-