@Test public void testGetStreamNames() throws Exception { List<String> listNames= service.getStreamNames(); assertTrue("Expected true not found", listNames.contains(StreamsHelper.STREAM_NAME)); assertTrue("Expected true not found", listNames.contains(StreamsHelper.STREAM_NAME2)); }
@CachedGauge(absolute = true, name = "streams.names", timeout = 30, timeoutUnit = TimeUnit.SECONDS) public List<String> getStreamNames() { Map<String, StreamStatusDTO> streams = streamStatusDao.getAll(); List<String> result = new ArrayList<>(); for (StreamStatusDTO stream : streams.values()) { result.add(stream.getStreamName()); } return result; }
StreamStatusMetricService { @CachedGauge(absolute = true, name = "streams.names", timeout = 30, timeoutUnit = TimeUnit.SECONDS) public List<String> getStreamNames() { Map<String, StreamStatusDTO> streams = streamStatusDao.getAll(); List<String> result = new ArrayList<>(); for (StreamStatusDTO stream : streams.values()) { result.add(stream.getStreamName()); } return result; } }
StreamStatusMetricService { @CachedGauge(absolute = true, name = "streams.names", timeout = 30, timeoutUnit = TimeUnit.SECONDS) public List<String> getStreamNames() { Map<String, StreamStatusDTO> streams = streamStatusDao.getAll(); List<String> result = new ArrayList<>(); for (StreamStatusDTO stream : streams.values()) { result.add(stream.getStreamName()); } return result; } StreamStatusMetricService(StreamStatusDao streamStatusDao); }
StreamStatusMetricService { @CachedGauge(absolute = true, name = "streams.names", timeout = 30, timeoutUnit = TimeUnit.SECONDS) public List<String> getStreamNames() { Map<String, StreamStatusDTO> streams = streamStatusDao.getAll(); List<String> result = new ArrayList<>(); for (StreamStatusDTO stream : streams.values()) { result.add(stream.getStreamName()); } return result; } StreamStatusMetricService(StreamStatusDao streamStatusDao); @CachedGauge(absolute = true, name = "streams.count", timeout = 30, timeoutUnit = TimeUnit.SECONDS) int getTotalStreams(); @CachedGauge(absolute = true, name = "streams.names", timeout = 30, timeoutUnit = TimeUnit.SECONDS) List<String> getStreamNames(); @CachedGauge(absolute = true, name = "streams.actions", timeout = 30, timeoutUnit = TimeUnit.SECONDS) Map<String, String> getStreamActions(); }
StreamStatusMetricService { @CachedGauge(absolute = true, name = "streams.names", timeout = 30, timeoutUnit = TimeUnit.SECONDS) public List<String> getStreamNames() { Map<String, StreamStatusDTO> streams = streamStatusDao.getAll(); List<String> result = new ArrayList<>(); for (StreamStatusDTO stream : streams.values()) { result.add(stream.getStreamName()); } return result; } StreamStatusMetricService(StreamStatusDao streamStatusDao); @CachedGauge(absolute = true, name = "streams.count", timeout = 30, timeoutUnit = TimeUnit.SECONDS) int getTotalStreams(); @CachedGauge(absolute = true, name = "streams.names", timeout = 30, timeoutUnit = TimeUnit.SECONDS) List<String> getStreamNames(); @CachedGauge(absolute = true, name = "streams.actions", timeout = 30, timeoutUnit = TimeUnit.SECONDS) Map<String, String> getStreamActions();  }