mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 09:40:58 +00:00
[Improve] add @Override (#2224)
This commit is contained in:
@@ -44,6 +44,7 @@ public class FtpCollectImpl extends AbstractCollect {
|
||||
/**
|
||||
* preCheck params
|
||||
*/
|
||||
@Override
|
||||
public void preCheck(Metrics metrics) throws IllegalArgumentException{
|
||||
if (metrics == null || metrics.getFtp() == null) {
|
||||
throw new IllegalArgumentException("Ftp collect must has ftp params.");
|
||||
|
||||
+1
@@ -88,6 +88,7 @@ public class MongodbSingleCollectImpl extends AbstractCollect {
|
||||
/**
|
||||
* Check that the mongodb connection information in metrics is complete
|
||||
*/
|
||||
@Override
|
||||
public void preCheck(Metrics metrics) throws IllegalArgumentException{
|
||||
Assert.isTrue(metrics != null && metrics.getMongodb() != null, "Mongodb collect must has mongodb params");
|
||||
MongodbProtocol mongodbProtocol = metrics.getMongodb();
|
||||
|
||||
+1
@@ -110,6 +110,7 @@ public class RocketmqSingleCollectImpl extends AbstractCollect implements Dispos
|
||||
* preCheck params
|
||||
* @param metrics metrics config
|
||||
*/
|
||||
@Override
|
||||
public void preCheck(Metrics metrics) throws IllegalArgumentException {
|
||||
Assert.isTrue(metrics != null && metrics.getRocketmq() != null, "Mongodb collect must has rocketmq params");
|
||||
RocketmqProtocol rocketmq = metrics.getRocketmq();
|
||||
|
||||
+1
@@ -73,6 +73,7 @@ public class RedisCommonCollectImpl extends AbstractCollect {
|
||||
connectionCommonCache = new ConnectionCommonCache<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preCheck(Metrics metrics) throws IllegalArgumentException{
|
||||
Assert.noNullElements(new Object[] {metrics, metrics.getRedis()}, "Redis collect must has redis params");
|
||||
RedisProtocol redisProtocol = metrics.getRedis();
|
||||
|
||||
Reference in New Issue
Block a user