diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java index 4fa3dee7f73..49937e77e51 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,6 +53,7 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl * Configuration triggered from {@link EndpointWebMvcAutoConfiguration} when a new * {@link EmbeddedServletContainer} running on a different port is required. * + * @author Dave Syer * @see EndpointWebMvcAutoConfiguration */ @Configuration diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricRepositoryAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricRepositoryAutoConfiguration.java index 889e7af7402..d6ca68499e2 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricRepositoryAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricRepositoryAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,11 +48,9 @@ import org.springframework.messaging.support.ExecutorSubscribableChannel; import com.codahale.metrics.MetricRegistry; /** - *

* {@link EnableAutoConfiguration Auto-configuration} for metrics services. Creates * user-facing {@link GaugeService} and {@link CounterService} instances, and also back - * end repositories to catch the data pumped into them. - *

+ * end repositories to catch the data pumped into them.

*

* An {@link InMemoryMetricRepository} is always created unless another * {@link MetricRepository} is already provided by the user. In general, even if metric diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java index 9b62efd36ff..bb7ad5d1d0c 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AbstractEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import javax.validation.constraints.Pattern; /** * Abstract base for {@link Endpoint} implementations. - *

* * @author Phillip Webb * @author Christian Dupuis diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/TraceEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/TraceEndpoint.java index ef687ec3b26..cf69bb6b560 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/TraceEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/TraceEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,6 @@ public class TraceEndpoint extends AbstractEndpoint> { /** * Create a new {@link TraceEndpoint} instance. - * * @param repository the trace repository */ public TraceEndpoint(TraceRepository repository) { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java index 4830f49a90e..b197a8e7a03 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -184,8 +184,6 @@ public class EndpointMBeanExporter extends MBeanExporter implements SmartLifecyc return builder.toString(); } - // SmartLifeCycle implementation - @Override public final int getPhase() { return this.phase; diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java index ed98da9aa09..908b16c9ebd 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,6 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl * @author Phillip Webb * @author Christian Dupuis * @author Dave Syer - * */ public class EndpointHandlerMapping extends RequestMappingHandlerMapping implements ApplicationContextAware { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/GenericMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointMvcAdapter.java similarity index 67% rename from spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/GenericMvcEndpoint.java rename to spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointMvcAdapter.java index 524200cbb77..57bb44d5039 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/GenericMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointMvcAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,26 @@ package org.springframework.boot.actuate.endpoint.mvc; import org.springframework.boot.actuate.endpoint.Endpoint; +import org.springframework.util.Assert; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; /** + * Adapter class to expose {@link Endpoint}s as {@link MvcEndpoint}s. + * * @author Dave Syer */ -public class GenericMvcEndpoint implements MvcEndpoint { +public class EndpointMvcAdapter implements MvcEndpoint { - private Endpoint delegate; + private final Endpoint delegate; - public GenericMvcEndpoint(Endpoint delegate) { + /** + * Create a new {@link EndpointMvcAdapter}. + * @param delegate the underlying {@link Endpoint} to adapt. + */ + public EndpointMvcAdapter(Endpoint delegate) { + Assert.notNull(delegate, "Delegate must not be null"); this.delegate = delegate; } @@ -49,11 +57,9 @@ public class GenericMvcEndpoint implements MvcEndpoint { } @Override - public Class getEndpointType() { - @SuppressWarnings("unchecked") - Class> type = (Class>) this.delegate - .getClass(); - return type; + @SuppressWarnings("rawtypes") + public Class getEndpointType() { + return this.delegate.getClass(); } } diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java index 1eacc19b752..f8a741a003f 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,9 +27,11 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; /** + * Adapter to expose {@link EnvironmentEndpoint} as an {@link MvcEndpoint}. + * * @author Dave Syer */ -public class EnvironmentMvcEndpoint extends GenericMvcEndpoint implements +public class EnvironmentMvcEndpoint extends EndpointMvcAdapter implements EnvironmentAware { private Environment environment; diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java index 7c7ea90d24f..8f4d03edebd 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +38,7 @@ import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.ServletWrappingController; /** - * {@link Endpoint} implementation to register the Jolokia infrastructure with the Boot - * management subsystem. + * {@link MvcEndpoint} to expose Jolokia. * * @author Christian Dupuis */ @@ -110,7 +109,8 @@ public class JolokiaMvcEndpoint implements MvcEndpoint, InitializingBean, } @Override - public Class getEndpointType() { + @SuppressWarnings("rawtypes") + public Class getEndpointType() { return null; } diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ManagementErrorEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ManagementErrorEndpoint.java index 5b9e120f9cb..f54eb450d73 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ManagementErrorEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ManagementErrorEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,17 +18,19 @@ package org.springframework.boot.actuate.endpoint.mvc; import java.util.Map; +import org.springframework.boot.actuate.endpoint.Endpoint; import org.springframework.boot.actuate.web.ErrorController; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.util.Assert; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.request.RequestContextHolder; /** - * Special endpoint for handling "/error" path when the management servlet is in a child - * context. The regular {@link ErrorController} should be available there but because of - * the way the handler mappings are set up it will not be detected. + * Special {@link MvcEndpoint} for handling "/error" path when the management servlet is + * in a child context. The regular {@link ErrorController} should be available there but + * because of the way the handler mappings are set up it will not be detected. * * @author Dave Syer */ @@ -36,9 +38,11 @@ import org.springframework.web.context.request.RequestContextHolder; public class ManagementErrorEndpoint implements MvcEndpoint { private final ErrorController controller; - private String path; + + private final String path; public ManagementErrorEndpoint(String path, ErrorController controller) { + Assert.notNull(controller, "Controller must not be null"); this.path = path; this.controller = controller; } @@ -61,7 +65,8 @@ public class ManagementErrorEndpoint implements MvcEndpoint { } @Override - public Class getEndpointType() { + @SuppressWarnings("rawtypes") + public Class getEndpointType() { return null; } -} \ No newline at end of file +} diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpoint.java index 26800b5b892..920d0adfc40 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,11 +25,13 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; /** + * Adapter to expose {@link MetricsEndpoint} as an {@link MvcEndpoint}. + * * @author Dave Syer */ -public class MetricsMvcEndpoint extends GenericMvcEndpoint { +public class MetricsMvcEndpoint extends EndpointMvcAdapter { - private MetricsEndpoint delegate; + private final MetricsEndpoint delegate; public MetricsMvcEndpoint(MetricsEndpoint delegate) { super(delegate); diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoint.java index 7aa76420f7c..a6ad2893ab3 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,10 +29,22 @@ import org.springframework.boot.actuate.endpoint.Endpoint; */ public interface MvcEndpoint { + /** + * Return the MVC path of the endpoint. + */ String getPath(); + /** + * Return if the endpoint exposes sensitive information. + */ boolean isSensitive(); - Class getEndpointType(); + /** + * Return the type of {@link Endpoint} exposed, or {@code null} if this + * {@link MvcEndpoint} exposes information that cannot be represented as a traditional + * {@link Endpoint}. + */ + @SuppressWarnings("rawtypes") + Class getEndpointType(); -} \ No newline at end of file +} diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoints.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoints.java index 3e1801b45c8..5b7e3296148 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoints.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoints.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ public class MvcEndpoints implements ApplicationContextAware, InitializingBean { Endpoint.class).values(); for (Endpoint endpoint : delegates) { if (isGenericEndpoint(endpoint.getClass())) { - this.endpoints.add(new GenericMvcEndpoint(endpoint)); + this.endpoints.add(new EndpointMvcAdapter(endpoint)); } } } @@ -85,4 +85,4 @@ public class MvcEndpoints implements ApplicationContextAware, InitializingBean { && !MvcEndpoint.class.isAssignableFrom(type); } -} \ No newline at end of file +} diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ShutdownMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ShutdownMvcEndpoint.java index 0877ed6885e..dfa6865200e 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ShutdownMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ShutdownMvcEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,9 +22,11 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; /** + * Adapter to expose {@link ShutdownEndpoint} as an {@link MvcEndpoint}. + * * @author Dave Syer */ -public class ShutdownMvcEndpoint extends GenericMvcEndpoint { +public class ShutdownMvcEndpoint extends EndpointMvcAdapter { public ShutdownMvcEndpoint(ShutdownEndpoint delegate) { super(delegate); diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/VanillaHealthIndicator.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/VanillaHealthIndicator.java index f98f91ee170..fa07500c82e 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/VanillaHealthIndicator.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/VanillaHealthIndicator.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.boot.actuate.health; /** - * Default implementation of {@link HealthIndicator} that simply returns "ok". + * Default implementation of {@link HealthIndicator} that simply returns {@literal "ok"}. * * @author Dave Syer */ diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/AbstractMetricExporter.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/AbstractMetricExporter.java index 42a454c3659..c78eb92cd30 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/AbstractMetricExporter.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/AbstractMetricExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,6 @@ public abstract class AbstractMetricExporter implements Exporter { /** * The earliest time for which data will be exported. - * * @param earliestTimestamp the timestamp to set */ public void setEarliestTimestamp(Date earliestTimestamp) { @@ -58,7 +57,6 @@ public abstract class AbstractMetricExporter implements Exporter { /** * Ignore timestamps (export all metrics). - * * @param ignoreTimestamps the flag to set */ public void setIgnoreTimestamps(boolean ignoreTimestamps) { @@ -96,7 +94,6 @@ public abstract class AbstractMetricExporter implements Exporter { * prefixes). If the metrics to be exported partition into groups identified by a * String, subclasses should override this method. Otherwise the default should be * fine (iteration over all metrics). - * * @return groups of metrics to iterate over (default singleton empty string) */ protected Iterable groups() { @@ -105,7 +102,6 @@ public abstract class AbstractMetricExporter implements Exporter { /** * Write the values associated with a group. - * * @param group the group to write * @param values the values to write */ @@ -113,10 +109,9 @@ public abstract class AbstractMetricExporter implements Exporter { /** * Get the next group of metrics to write. - * * @param group the group name to write * @return some metrics to write */ protected abstract Iterable> next(String group); -} \ No newline at end of file +} diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/InMemoryMetricRepository.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/InMemoryMetricRepository.java index 360b89d04c7..d7012ea429c 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/InMemoryMetricRepository.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/InMemoryMetricRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ public class InMemoryMetricRepository implements MetricRepository, MultiMetricRe PrefixMetricReader { private SimpleInMemoryRepository> metrics = new SimpleInMemoryRepository>(); + private Collection groups = new HashSet(); @Override diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepository.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepository.java index a57cbc6032f..fea6f68e3e0 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepository.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepository.java @@ -43,6 +43,7 @@ public class RedisMultiMetricRepository implements MultiMetricRepository { private static final String DEFAULT_METRICS_PREFIX = "spring.groups."; private String prefix = DEFAULT_METRICS_PREFIX; + private String keys = this.prefix + "keys"; private BoundZSetOperations zSetOperations; @@ -57,7 +58,6 @@ public class RedisMultiMetricRepository implements MultiMetricRepository { /** * The prefix for all metrics keys. - * * @param prefix the prefix to set for all metrics keys */ public void setPrefix(String prefix) { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisUtils.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisUtils.java index 40763e47bbd..b27f139659e 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisUtils.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisUtils.java @@ -1,3 +1,19 @@ +/* + * Copyright 2012-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.boot.actuate.metrics.repository.redis; import org.springframework.data.redis.connection.RedisConnectionFactory; @@ -8,6 +24,8 @@ import org.springframework.data.redis.serializer.GenericToStringSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer; /** + * General Utils for working with Redis. + * * @author Luke Taylor */ class RedisUtils { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/RichGauge.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/RichGauge.java index 211fbc4f6f6..722481152c2 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/RichGauge.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/RichGauge.java @@ -1,3 +1,19 @@ +/* + * Copyright 2012-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.boot.actuate.metrics.rich; import org.springframework.util.Assert; diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/CodahaleMetricWriter.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/CodahaleMetricWriter.java index 47c5f9d4e25..20cc887ce0f 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/CodahaleMetricWriter.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/CodahaleMetricWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import com.codahale.metrics.Timer; /** * A {@link MetricWriter} that send data to a Codahale {@link MetricRegistry} based on a * naming convention: + * *