@Override public byte[] getCacheKey() { final String tzId = (tz == null ? DateTimeZone.UTC : tz).getID(); final String localeTag = (locale == null ? Locale.getDefault() : locale).toLanguageTag(); final byte[] exprBytes = StringUtils.toUtf8(format + "\u0001" + tzId + "\u0001" + localeTag); final byte[] granularityCacheKey = granularity.getCacheKey(); return ByteBuffer.allocate(4 + exprBytes.length + granularityCacheKey.length) .put(ExtractionCacheHelper.CACHE_TYPE_ID_TIME_FORMAT) .put(exprBytes) .put((byte) 0xFF) .put(granularityCacheKey) .put((byte) 0xFF) .put(asMillis ? (byte) 1 : (byte) 0) .array(); }
final byte[] filterBytes = dimFilter == null ? new byte[]{} : dimFilter.getCacheKey(); final byte[] querySpecBytes = query.getQuery().getCacheKey(); final byte[] granularityBytes = query.getGranularity().getCacheKey();
final byte[] granularityBytes = query.getGranularity().getCacheKey();
@Override public byte[] getCacheKey() { final String tzId = (tz == null ? DateTimeZone.UTC : tz).getID(); final String localeTag = (locale == null ? Locale.getDefault() : locale).toLanguageTag(); final byte[] exprBytes = StringUtils.toUtf8(format + "\u0001" + tzId + "\u0001" + localeTag); final byte[] granularityCacheKey = granularity.getCacheKey(); return ByteBuffer.allocate(4 + exprBytes.length + granularityCacheKey.length) .put(ExtractionCacheHelper.CACHE_TYPE_ID_TIME_FORMAT) .put(exprBytes) .put((byte) 0xFF) .put(granularityCacheKey) .put((byte) 0xFF) .put(asMillis ? (byte) 1 : (byte) 0) .array(); }
final byte[] filterBytes = dimFilter == null ? new byte[]{} : dimFilter.getCacheKey(); final byte[] querySpecBytes = query.getQuery().getCacheKey(); final byte[] granularityBytes = query.getGranularity().getCacheKey();
final byte[] granularityBytes = query.getGranularity().getCacheKey();