- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 53 for weight (0.65 sec)
-
android/guava/src/com/google/common/cache/Weigher.java
/** * Calculates the weights of cache entries. * * @author Charles Fry * @since 11.0 */ @GwtCompatible @ElementTypesAreNonnullByDefault public interface Weigher<K, V> { /** * Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply * relative to each other. * * @return the weight of the entry; must be non-negative */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 15 18:00:07 UTC 2021 - 1.1K bytes - Viewed (0) -
guava/src/com/google/common/cache/Weigher.java
/** * Calculates the weights of cache entries. * * @author Charles Fry * @since 11.0 */ @GwtCompatible @FunctionalInterface @ElementTypesAreNonnullByDefault public interface Weigher<K, V> { /** * Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply * relative to each other. * * @return the weight of the entry; must be non-negative */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 15 18:00:07 UTC 2021 - 1.1K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/LocalCache.java
ValueReference<K, V> previous = entry.getValueReference(); int weight = map.weigher.weigh(key, value); checkState(weight >= 0, "Weights must be non-negative"); ValueReference<K, V> valueReference = map.valueStrength.referenceValue(this, entry, value, weight); entry.setValueReference(valueReference); recordWrite(entry, weight, now); previous.notifyNewValue(value); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sat May 18 03:24:34 UTC 2024 - 143.6K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
checkArgument(maximumSize >= 0, "maximum size must not be negative"); this.maximumSize = maximumSize; return this; } /** * Specifies the maximum weight of entries the cache may contain. Weight is determined using the * {@link Weigher} specified with {@link #weigher}, and use of this method requires a
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 15 16:12:13 UTC 2024 - 44.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheEvictionTest.java
assertThat(keySet).containsExactly(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); // add an at-the-maximum-weight entry getAll(cache, asList(45)); CacheTesting.drainRecencyQueues(cache); assertThat(keySet).containsExactly(0, 45); // add an over-the-maximum-weight entry getAll(cache, asList(46)); CacheTesting.drainRecencyQueues(cache); assertThat(keySet).contains(0); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 14.9K bytes - Viewed (0) -
guava/src/com/google/common/io/AppendableWriter.java
@Override public void write(char[] cbuf, int off, int len) throws IOException { checkNotClosed(); // It turns out that creating a new String is usually as fast, or faster // than wrapping cbuf in a light-weight CharSequence. target.append(new String(cbuf, off, len)); } /* * Override a few functions for performance reasons to avoid creating unnecessary strings. */ @Override
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 28 20:13:02 UTC 2023 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java
assertThat(keySet).containsExactly(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); // add an at-the-maximum-weight entry getAll(cache, asList(45)); CacheTesting.drainRecencyQueues(cache); assertThat(keySet).containsExactly(0, 45); // add an over-the-maximum-weight entry getAll(cache, asList(46)); CacheTesting.drainRecencyQueues(cache); assertThat(keySet).contains(0); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 14.9K bytes - Viewed (0) -
guava/src/com/google/common/cache/LocalCache.java
ValueReference<K, V> previous = entry.getValueReference(); int weight = map.weigher.weigh(key, value); checkState(weight >= 0, "Weights must be non-negative"); ValueReference<K, V> valueReference = map.valueStrength.referenceValue(this, entry, value, weight); entry.setValueReference(valueReference); recordWrite(entry, weight, now); previous.notifyNewValue(value); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sat May 18 03:24:34 UTC 2024 - 149.2K bytes - Viewed (0) -
guava/src/com/google/common/cache/CacheBuilder.java
checkArgument(maximumSize >= 0, "maximum size must not be negative"); this.maximumSize = maximumSize; return this; } /** * Specifies the maximum weight of entries the cache may contain. Weight is determined using the * {@link Weigher} specified with {@link #weigher}, and use of this method requires a
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 15 16:12:13 UTC 2024 - 51.3K bytes - Viewed (0) -
android/guava/src/com/google/common/io/AppendableWriter.java
@Override public void write(char[] cbuf, int off, int len) throws IOException { checkNotClosed(); // It turns out that creating a new String is usually as fast, or faster // than wrapping cbuf in a light-weight CharSequence. target.append(new String(cbuf, off, len)); } /* * Override a few functions for performance reasons to avoid creating unnecessary strings. */ @Override
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 28 20:13:02 UTC 2023 - 3.4K bytes - Viewed (0)