[Change] CacheStore-redis 调整 Factory 对获取尚未完成组件的反馈方式;

[Change] RedisCacheStoreFactory 调整 List 和 Set 的行为(返回 null 改为抛出异常);
This commit is contained in:
LamGC 2020-09-23 13:53:41 +08:00
parent 4812eec2d7
commit 4d8e0af7a5
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -19,6 +19,7 @@ package net.lamgc.cgj.bot.cache.redis;
import net.lamgc.cgj.bot.cache.*; import net.lamgc.cgj.bot.cache.*;
import net.lamgc.cgj.bot.cache.convert.StringConverter; import net.lamgc.cgj.bot.cache.convert.StringConverter;
import net.lamgc.cgj.bot.cache.exception.GetCacheStoreException;
/** /**
* *
@ -33,12 +34,12 @@ public class RedisCacheStoreFactory implements CacheStoreFactory {
@Override @Override
public <E> ListCacheStore<E> newListCacheStore(String identify, StringConverter<E> converter) { public <E> ListCacheStore<E> newListCacheStore(String identify, StringConverter<E> converter) {
return null; throw new GetCacheStoreException("No corresponding implementation");
} }
@Override @Override
public <E> SetCacheStore<E> newSetCacheStore(String identify, StringConverter<E> converter) { public <E> SetCacheStore<E> newSetCacheStore(String identify, StringConverter<E> converter) {
return null; throw new GetCacheStoreException("No corresponding implementation");
} }
@Override @Override