refactor: 修改成员变量访问权限
This commit is contained in:
parent
9570df8b14
commit
90a8102ee3
@ -13,11 +13,11 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
*/
|
*/
|
||||||
public abstract class AbstractNotifierManager implements NotifierManager {
|
public abstract class AbstractNotifierManager implements NotifierManager {
|
||||||
|
|
||||||
private final Map<String, Map<String, NotifierProvider>> providers = new ConcurrentHashMap<>();
|
protected final Map<String, Map<String, NotifierProvider>> providers = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final Map<String, Notifier> notifiers = new ConcurrentHashMap<>();
|
protected final Map<String, Notifier> notifiers = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final NotifyConfigManager configManager;
|
protected final NotifyConfigManager configManager;
|
||||||
|
|
||||||
// private EventBus eventBus;
|
// private EventBus eventBus;
|
||||||
|
|
||||||
@ -47,12 +47,12 @@ public abstract class AbstractNotifierManager implements NotifierManager {
|
|||||||
if (null == provider) {
|
if (null == provider) {
|
||||||
throw new UnsupportedOperationException("不支持的服务商: " + properties.getProvider());
|
throw new UnsupportedOperationException("不支持的服务商: " + properties.getProvider());
|
||||||
}
|
}
|
||||||
Notifier notifier1 = provider.createNotifier(properties);
|
Notifier notifierNew = provider.createNotifier(properties);
|
||||||
Notifier notifier2 = notifiers.put(properties.getId(), notifier1);
|
Notifier notifierOld = notifiers.put(properties.getId(), notifierNew);
|
||||||
if (null != notifier2) {
|
if (null != notifierOld) {
|
||||||
notifier2.close();
|
notifierOld.close();
|
||||||
}
|
}
|
||||||
return notifier1;
|
return notifierNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user