add addMonitor and setMonitors method
package com.alicp.jetcache;
+import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
@@ -93,6 +94,15 @@ public abstract class AbstractCacheBuilder<T extends AbstractCacheBuilder<T>> im
getConfig().setExpireAfterWriteInMillis(expireAfterWriteInMillis);
}
+ public T addMonitor(CacheMonitor monitor) {
+ getConfig().getMonitors().add(monitor);
+ return self();
+ }
+
+ public void setMonitors(List<CacheMonitor> monitors) {
+ getConfig().setMonitors(monitors);
+ }
+
public T cacheNullValue(boolean cacheNullValue) {
getConfig().setCacheNullValue(cacheNullValue);
return self();
