private Map<String, Long> getYearCounts(String name) {
		AggregateKeyGenerator akg = new AggregateKeyGenerator(getPrefix(), name, new DateTime());
		return getEntries(akg.getYearsKey());
	}
For each query, we need to convert the interval into two variations. One is the start and end points rounded to
the resolution (used to calculate the number of entries to be returned from the query). The second is the start
and end buckets we have to retrieve which may contain entries for the interval. For example, when querying
at day resolution, the number of entries is the number of Joda time days between the start (rounded down to a
day boundary) and the end plus one day (also rounded down). However, we need load the data from the buckets
from the month the start day occurs in to the month end day occurs in. These are then concatenated, using the
start day as the start index into the first array, and writing the total number of entries in sequence from that
point into the combined result counts array.
spring-xd-analytics/src/main/java/org/springframework/xd/analytics/metrics/redis/RedisAggregateCounterRepository.java