public class SubCache
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
SubCache.BucketHit |
Constructor and Description |
---|
SubCache(TagHistoryCache parent,
CacheKey key,
TagHistoryQueryParams params,
double windowSize) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
containedIn(CacheBucket bucket,
long time)
Returns whether the bucket contains the time.
|
TagHistoryQueryParams |
getCacheParams() |
Dataset |
getData(TagHistoryQueryProvider prov,
TagHistoryQueryParams queryParams)
Gathers together the cached buckets, queries new data, and zips it together to return the final dataset that
will be returned for the query.
|
protected LoggerEx |
getLogger() |
protected TagHistoryCache |
getParent() |
int |
getTimestampColumnPos()
Returns the position of the date column in the dataset generated by the query params.
|
java.lang.Double |
getWindowSize() |
boolean |
registerBucketData(CacheBucket bucket) |
java.lang.String |
toString() |
protected TimeMaskedDataset |
wrapDS(Dataset ds,
long start,
long end,
boolean endIsInclusive)
"Masks" a data set to a specific time range.
|
public SubCache(TagHistoryCache parent, CacheKey key, TagHistoryQueryParams params, double windowSize)
protected LoggerEx getLogger()
protected TagHistoryCache getParent()
public java.lang.Double getWindowSize()
public TagHistoryQueryParams getCacheParams()
public int getTimestampColumnPos()
public boolean registerBucketData(CacheBucket bucket)
public Dataset getData(TagHistoryQueryProvider prov, TagHistoryQueryParams queryParams) throws java.lang.Exception
queryParams
- the parameters of this particular query. Our core params dictate our return, so we basically
just want to use the start and end of the passed in params.java.lang.Exception
protected boolean containedIn(CacheBucket bucket, long time)
protected TimeMaskedDataset wrapDS(Dataset ds, long start, long end, boolean endIsInclusive)
endIsInclusive
- if false, the end time used will actually be end-1, in order to avoid matching on "="
conditions.public java.lang.String toString()
toString
in class java.lang.Object