@Test public void testConfigTtl_invalid() { Assert.assertFalse(ttlProvider.getTTL("acBar", Granularity.FULL, RollupType.SET).isPresent()); }
@Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting to safe TTL values.", gran.name(), rollupType.name()); return Optional.absent(); } return Optional.of(ttl); }
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting to safe TTL values.", gran.name(), rollupType.name()); return Optional.absent(); } return Optional.of(ttl); } }
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting to safe TTL values.", gran.name(), rollupType.name()); return Optional.absent(); } return Optional.of(ttl); } @VisibleForTesting  ConfigTtlProvider(); }
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting to safe TTL values.", gran.name(), rollupType.name()); return Optional.absent(); } return Optional.of(ttl); } @VisibleForTesting  ConfigTtlProvider(); static ConfigTtlProvider getInstance(); @Override Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType); TimeValue getConfigTTLForIngestion(); boolean areTTLsForced(); }
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting to safe TTL values.", gran.name(), rollupType.name()); return Optional.absent(); } return Optional.of(ttl); } @VisibleForTesting  ConfigTtlProvider(); static ConfigTtlProvider getInstance(); @Override Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType); TimeValue getConfigTTLForIngestion(); boolean areTTLsForced();  }