CachedEntry
This commit is contained in:
@@ -178,7 +178,11 @@ public class CachedAsmMethodBoost extends AsmMethodBoost {
|
||||
mv.visitMaxs(20, 20);
|
||||
mv.visitEnd();
|
||||
CachedAction action = new CachedAction(
|
||||
new CachedEntry(cached), method, serviceType, methodBean.paramNameArray(method), dynFieldName);
|
||||
new CachedEntry(cached, method),
|
||||
method,
|
||||
serviceType,
|
||||
methodBean.paramNameArray(method),
|
||||
dynFieldName);
|
||||
actions.put(dynFieldName, action);
|
||||
}
|
||||
{ // ThrowSupplier
|
||||
@@ -226,7 +230,7 @@ public class CachedAsmMethodBoost extends AsmMethodBoost {
|
||||
String dynFieldName = cached.dynField();
|
||||
AsmMethodBean methodBean = AsmMethodBean.get(methodBeans, method);
|
||||
CachedAction action = new CachedAction(
|
||||
new CachedEntry(cached),
|
||||
new CachedEntry(cached, method),
|
||||
method,
|
||||
serviceType,
|
||||
methodBean.paramNameArray(method),
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
*/
|
||||
package org.redkale.cached.spi;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.redkale.cached.Cached;
|
||||
import org.redkale.convert.json.JsonConvert;
|
||||
import org.redkale.util.Utility;
|
||||
|
||||
/**
|
||||
* 缓存信息的基本对象
|
||||
@@ -36,9 +38,9 @@ public class CachedEntry {
|
||||
|
||||
public CachedEntry() {}
|
||||
|
||||
public CachedEntry(DynForCached cached) {
|
||||
public CachedEntry(DynForCached cached, Method method) {
|
||||
this.manager = cached.manager();
|
||||
this.name = cached.name();
|
||||
this.name = Utility.isBlank(cached.name()) ? method.getName() : cached.name();
|
||||
this.key = cached.key();
|
||||
this.localLimit = cached.localLimit();
|
||||
this.localExpire = cached.localExpire();
|
||||
@@ -47,9 +49,9 @@ public class CachedEntry {
|
||||
this.nullable = cached.nullable();
|
||||
}
|
||||
|
||||
public CachedEntry(Cached cached) {
|
||||
public CachedEntry(Cached cached, Method method) {
|
||||
this.manager = cached.manager();
|
||||
this.name = cached.name();
|
||||
this.name = Utility.isBlank(cached.name()) ? method.getName() : cached.name();
|
||||
this.key = cached.key();
|
||||
this.localLimit = cached.localLimit();
|
||||
this.localExpire = cached.localExpire();
|
||||
|
||||
Reference in New Issue
Block a user