/** * Configure a specific cache instance, use this if you wish for the consequent builders to * re-use the same cache instance. */ public Typed<T> cache(final ConcurrentMap<T, MetricId> map, Loader<T> loader) { if (map == null) { throw new IllegalArgumentException("'cache' must not be null"); } return loader(loader).typedCacheBuilder(new TypedCacheBuilder<T>() { @Override public Cache<T> build(Loader<T> loader) { return new ConcurrentMapCache<T>(map, loader); } }); }
public Typed<T> mapBuilder(MapBuilder mapBuilder, Loader<T> loader) { return loader(loader).any(any.mapBuilder(mapBuilder)); }
public <T> Typed<T> loader(Loader<T> loader) { return new Typed<T>(this, null, null, null).loader(loader); }