@Test public void purge() throws Exception { long until = 0L; DataCategory category = DataCategory.QUEUESTATS; service.purge(category, until); Mockito.verify(store, Mockito.only()).delete(category, until); Mockito.doThrow(IllegalStateException.class).when(store).delete( Mockito.any(DataCategory.class), Mockito.anyLong()); service.purge(category, until); }
@Override public void purge(long timestamp) { for (DataCategory category : DataCategory.values()) { purge(category, timestamp); } }
TsdrElasticSearchPersistenceServiceImpl implements TSDRMetricPersistenceService, TSDRLogPersistenceService,
        TSDRBinaryPersistenceService { @Override public void purge(long timestamp) { for (DataCategory category : DataCategory.values()) { purge(category, timestamp); } } }
TsdrElasticSearchPersistenceServiceImpl implements TSDRMetricPersistenceService, TSDRLogPersistenceService,
        TSDRBinaryPersistenceService { @Override public void purge(long timestamp) { for (DataCategory category : DataCategory.values()) { purge(category, timestamp); } } @Inject  TsdrElasticSearchPersistenceServiceImpl(ElasticSearchStore store); }
TsdrElasticSearchPersistenceServiceImpl implements TSDRMetricPersistenceService, TSDRLogPersistenceService,
        TSDRBinaryPersistenceService { @Override public void purge(long timestamp) { for (DataCategory category : DataCategory.values()) { purge(category, timestamp); } } @Inject  TsdrElasticSearchPersistenceServiceImpl(ElasticSearchStore store); @Override void storeMetric(TSDRMetricRecord metricRecord); @Override void storeMetric(List<TSDRMetricRecord> recordList); @Override List<TSDRMetricRecord> getTSDRMetricRecords(String key, long start, long end); @Override void storeLog(TSDRLogRecord logRecord); @Override void storeLog(List<TSDRLogRecord> recordList); @Override List<TSDRLogRecord> getTSDRLogRecords(String key, long start, long end); @Override void storeBinary(TSDRBinaryRecord binaryRecord); @Override void storeBinary(List<TSDRBinaryRecord> recordList); @Override List<TSDRBinaryRecord> getTSDRBinaryRecords(String key, long start, long end); @Override void purge(long timestamp); @Override void purge(DataCategory category, long timestamp); }
TsdrElasticSearchPersistenceServiceImpl implements TSDRMetricPersistenceService, TSDRLogPersistenceService,
        TSDRBinaryPersistenceService { @Override public void purge(long timestamp) { for (DataCategory category : DataCategory.values()) { purge(category, timestamp); } } @Inject  TsdrElasticSearchPersistenceServiceImpl(ElasticSearchStore store); @Override void storeMetric(TSDRMetricRecord metricRecord); @Override void storeMetric(List<TSDRMetricRecord> recordList); @Override List<TSDRMetricRecord> getTSDRMetricRecords(String key, long start, long end); @Override void storeLog(TSDRLogRecord logRecord); @Override void storeLog(List<TSDRLogRecord> recordList); @Override List<TSDRLogRecord> getTSDRLogRecords(String key, long start, long end); @Override void storeBinary(TSDRBinaryRecord binaryRecord); @Override void storeBinary(List<TSDRBinaryRecord> recordList); @Override List<TSDRBinaryRecord> getTSDRBinaryRecords(String key, long start, long end); @Override void purge(long timestamp); @Override void purge(DataCategory category, long timestamp);  }