Update javadoc for CommandCenterProvider

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This commit is contained in:
Eric Zhao 2019-03-11 20:49:29 +08:00
parent efcd877714
commit 860e7eb16e
1 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,18 @@
/*
* Copyright 1999-2019 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.csp.sentinel.command;
import com.alibaba.csp.sentinel.log.RecordLog;
@ -8,7 +23,7 @@ import com.alibaba.csp.sentinel.util.SpiLoader;
* Provider for a universal {@link CommandCenter} instance.
*
* @author cdfive
* @date 2019-01-11
* @since 1.5.0
*/
public class CommandCenterProvider {
@ -25,10 +40,16 @@ public class CommandCenterProvider {
RecordLog.warn("[CommandCenterProvider] No existing CommandCenter, resolve failed");
} else {
commandCenter = resolveCommandCenter;
RecordLog.info("[CommandCenterProvider] CommandCenter resolved: " + resolveCommandCenter.getClass().getCanonicalName());
RecordLog.info("[CommandCenterProvider] CommandCenter resolved: " + resolveCommandCenter.getClass()
.getCanonicalName());
}
}
/**
* Get resolved {@link CommandCenter} instance.
*
* @return resolved {@code CommandCenter} instance
*/
public static CommandCenter getCommandCenter() {
return commandCenter;
}