public class TimelineMetricCacheEntryFactory extends Object implements net.sf.ehcache.constructs.blocking.UpdatingCacheEntryFactory
Constructor and Description |
---|
TimelineMetricCacheEntryFactory(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
Object |
createEntry(Object key)
This method is called on a get element from cache call when key is not
found in cache, returns a value for the key to be cached.
|
protected Long |
getRefreshRequestEndTime(Long existingSeriesStartTime,
Long existingSeriesEndTime,
Long requestedEndTime) |
protected Long |
getRefreshRequestStartTime(Long existingSeriesStartTime,
Long existingSeriesEndTime,
Long requestedStartTime) |
void |
updateEntryValue(Object key,
Object value)
Called on a get call for existing values in the cache,
the necessary locking code is present in the get call and this call
should update the value of the cache entry before returning.
|
protected void |
updateTimelineMetricsInCache(org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics newMetrics,
TimelineMetricsCacheValue timelineMetricsCacheValue,
Long requestedStartTime,
Long requestedEndTime,
boolean removeAll)
Update cache with new timeseries data
|
@Inject public TimelineMetricCacheEntryFactory(Configuration configuration)
public Object createEntry(Object key) throws Exception
createEntry
in interface net.sf.ehcache.constructs.blocking.CacheEntryFactory
key
- @org.apache.ambari.server.controller.metrics.timeline.cache.TimelineAppMetricCacheKeyException
public void updateEntryValue(Object key, Object value) throws Exception
updateEntryValue
in interface net.sf.ehcache.constructs.blocking.UpdatingCacheEntryFactory
key
- @org.apache.ambari.server.controller.metrics.timeline.cache.TimelineAppMetricCacheKeyvalue
- @org.apache.hadoop.metrics2.sink.timeline.TimelineMetricsException
protected void updateTimelineMetricsInCache(org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics newMetrics, TimelineMetricsCacheValue timelineMetricsCacheValue, Long requestedStartTime, Long requestedEndTime, boolean removeAll)
protected Long getRefreshRequestStartTime(Long existingSeriesStartTime, Long existingSeriesEndTime, Long requestedStartTime)
Copyright © 2022 Apache Software Foundation. All rights reserved.