我正在使用带有 ModifiedExpiryPolicy 的 Ignite 缓存,并且需要在事件执行之前执行一行代码。有什么帮助吗?
IgniteCache<String, Object> expiresCache = cache.withExpiryPolicy(new ModifiedExpiryPolicy(new Duration(Time.MINUTES, timeInMins)));
public class ClassName {
public IgnitePredicate<CacheEvent> functionName() {
return new IgnitePredicate<CacheEvent>() {
@Override
public boolean apply(CacheEvent evt) {
//code to be executed after event.
return true;
}
};
}
}