Lines Matching defs:CacheBuilder

64  *   LoadingCache<Key, Graph> graphs = CacheBuilder.newBuilder()
124 * <p>The caches produced by {@code CacheBuilder} are serializable, and the deserialized caches
136 public final class CacheBuilder<K, V> {
197 private static final Logger logger = Logger.getLogger(CacheBuilder.class.getName());
225 CacheBuilder() {}
228 * Constructs a new {@code CacheBuilder} instance with default settings, including strong keys,
231 public static CacheBuilder<Object, Object> newBuilder() {
232 return new CacheBuilder<Object, Object>();
238 CacheBuilder<K, V> lenientParsing() {
249 CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) {
266 CacheBuilder<K, V> valueEquivalence(Equivalence<Object> equivalence) {
287 public CacheBuilder<K, V> initialCapacity(int initialCapacity) {
317 public CacheBuilder<K, V> concurrencyLevel(int concurrencyLevel) {
342 public CacheBuilder<K, V> maximumSize(long size) {
372 public CacheBuilder<K, V> maximumWeight(long weight) {
392 * <p><b>Important note:</b> Instead of returning <em>this</em> as a {@code CacheBuilder}
393 * instance, this method returns {@code CacheBuilder<K1, V1>}. From this point on, either the
397 * weigher already provided; the {@code CacheBuilder} type cannot do this. For best results,
399 * configuring a {@code CacheBuilder} and building your {@link Cache} all in a single statement.
401 * <p><b>Warning:</b> if you ignore the above advice, and use this {@code CacheBuilder} to build
410 public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> weigher(
420 CacheBuilder<K1, V1> me = (CacheBuilder<K1, V1>) this;
443 CacheBuilder<K, V> strongKeys() {
461 public CacheBuilder<K, V> weakKeys() {
465 CacheBuilder<K, V> setKeyStrength(Strength strength) {
480 CacheBuilder<K, V> strongValues() {
501 public CacheBuilder<K, V> weakValues() {
525 public CacheBuilder<K, V> softValues() {
529 CacheBuilder<K, V> setValueStrength(Strength strength) {
558 public CacheBuilder<K, V> expireAfterWrite(long duration, TimeUnit unit) {
592 public CacheBuilder<K, V> expireAfterAccess(long duration, TimeUnit unit) {
630 public CacheBuilder<K, V> refreshAfterWrite(long duration, TimeUnit unit) {
652 public CacheBuilder<K, V> ticker(Ticker ticker) {
666 * Specifies a listener instance, which all caches built using this {@code CacheBuilder} will
669 * <p>Each cache built by this {@code CacheBuilder} after this method is called invokes the
677 * <p><b>Important note:</b> Instead of returning <em>this</em> as a {@code CacheBuilder}
678 * instance, this method returns {@code CacheBuilder<K1, V1>}. From this point on, either the
682 * listener already provided; the {@code CacheBuilder} type cannot do this. For best results,
684 * configuring a {@code CacheBuilder} and building your {@link Cache} all in a single statement.
686 * <p><b>Warning:</b> if you ignore the above advice, and use this {@code CacheBuilder} to build
694 public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> removalListener(
700 CacheBuilder<K1, V1> me = (CacheBuilder<K1, V1>) this;
714 CacheBuilder<K, V> disableStats() {
730 * <p>This method does not alter the state of this {@code CacheBuilder} instance, so it can be
748 * <p>This method does not alter the state of this {@code CacheBuilder} instance, so it can be
779 * Returns a string representation for this CacheBuilder instance. The exact form of the returned