Skip to content

Commit 3dc470a

Browse files
committed
rename CacheMonitorInstaller to CacheMonitorManager
1 parent 543f203 commit 3dc470a

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/CacheContext.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ protected Cache buildCache(CachedAnnoConfig cachedAnnoConfig, String area, Strin
142142
cache.config().setPenetrationProtectTimeout(protectConfig.getPenetrationProtectTimeout());
143143
}
144144

145-
if (configProvider.getCacheMonitorInstaller() != null) {
146-
configProvider.getCacheMonitorInstaller().addMonitors(area, cacheName, cache);
145+
if (configProvider.getCacheMonitorManager() != null) {
146+
configProvider.getCacheMonitorManager().addMonitors(area, cacheName, cache);
147147
}
148148
return cache;
149149
}

jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/CacheMonitorInstaller.java renamed to jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/CacheMonitorManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
/**
99
* @author <a href="mailto:areyouok@gmail.com">huangli</a>
1010
*/
11-
public interface CacheMonitorInstaller {
11+
public interface CacheMonitorManager {
1212
void addMonitors(String area, String cacheName, Cache cache);
1313
}

jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/ConfigProvider.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ public class ConfigProvider extends AbstractLifecycle {
2121
protected SimpleCacheManager cacheManager;
2222
protected EncoderParser encoderParser;
2323
protected KeyConvertorParser keyConvertorParser;
24-
protected CacheMonitorInstaller cacheMonitorInstaller;
24+
protected CacheMonitorManager cacheMonitorManager;
2525
private Consumer<StatInfo> metricsCallback = new StatInfoLogger(false);
2626
private CacheMessagePublisher cacheMessagePublisher;
2727

28-
private CacheMonitorInstaller defaultCacheMonitorInstaller = new DefaultCacheMonitorInstaller();
28+
private CacheMonitorManager defaultCacheMonitorManager = new DefaultCacheMonitorManager();
2929

3030
private CacheContext cacheContext;
3131

3232
public ConfigProvider() {
3333
cacheManager = SimpleCacheManager.defaultManager;
3434
encoderParser = new DefaultEncoderParser();
3535
keyConvertorParser = new DefaultKeyConvertorParser();
36-
cacheMonitorInstaller = defaultCacheMonitorInstaller;
36+
cacheMonitorManager = defaultCacheMonitorManager;
3737
}
3838

3939
@Override
@@ -43,8 +43,8 @@ public void doInit() {
4343
}
4444

4545
protected void initDefaultCacheMonitorInstaller() {
46-
if (cacheMonitorInstaller == defaultCacheMonitorInstaller) {
47-
DefaultCacheMonitorInstaller installer = (DefaultCacheMonitorInstaller) cacheMonitorInstaller;
46+
if (cacheMonitorManager == defaultCacheMonitorManager) {
47+
DefaultCacheMonitorManager installer = (DefaultCacheMonitorManager) cacheMonitorManager;
4848
installer.setGlobalCacheConfig(globalCacheConfig);
4949
installer.setMetricsCallback(metricsCallback);
5050
if (cacheMessagePublisher != null) {
@@ -61,8 +61,8 @@ public void doShutdown() {
6161
}
6262

6363
protected void shutdownDefaultCacheMonitorInstaller() {
64-
if (cacheMonitorInstaller == defaultCacheMonitorInstaller) {
65-
((DefaultCacheMonitorInstaller) cacheMonitorInstaller).shutdown();
64+
if (cacheMonitorManager == defaultCacheMonitorManager) {
65+
((DefaultCacheMonitorManager) cacheMonitorManager).shutdown();
6666
}
6767
}
6868

@@ -114,12 +114,12 @@ public void setKeyConvertorParser(KeyConvertorParser keyConvertorParser) {
114114
this.keyConvertorParser = keyConvertorParser;
115115
}
116116

117-
public CacheMonitorInstaller getCacheMonitorInstaller() {
118-
return cacheMonitorInstaller;
117+
public CacheMonitorManager getCacheMonitorManager() {
118+
return cacheMonitorManager;
119119
}
120120

121-
public void setCacheMonitorInstaller(CacheMonitorInstaller cacheMonitorInstaller) {
122-
this.cacheMonitorInstaller = cacheMonitorInstaller;
121+
public void setCacheMonitorManager(CacheMonitorManager cacheMonitorManager) {
122+
this.cacheMonitorManager = cacheMonitorManager;
123123
}
124124

125125
public GlobalCacheConfig getGlobalCacheConfig() {

jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/DefaultCacheMonitorInstaller.java renamed to jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/DefaultCacheMonitorManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* @author <a href="mailto:areyouok@gmail.com">huangli</a>
2323
*/
24-
public class DefaultCacheMonitorInstaller extends AbstractLifecycle implements CacheMonitorInstaller {
24+
public class DefaultCacheMonitorManager extends AbstractLifecycle implements CacheMonitorManager {
2525

2626
private DefaultMetricsManager defaultMetricsManager;
2727

jetcache-anno/src/main/java/com/alicp/jetcache/anno/support/SpringConfigProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public void setKeyConvertorParser(KeyConvertorParser keyConvertorParser) {
6565

6666
@Autowired(required = false)
6767
@Override
68-
public void setCacheMonitorInstaller(CacheMonitorInstaller cacheMonitorInstaller) {
69-
super.setCacheMonitorInstaller(cacheMonitorInstaller);
68+
public void setCacheMonitorManager(CacheMonitorManager cacheMonitorManager) {
69+
super.setCacheMonitorManager(cacheMonitorManager);
7070
}
7171

7272
@Autowired(required = false)

0 commit comments

Comments
 (0)