Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for RemovalListener (0.09 sec)

  1. guava-tests/test/com/google/common/cache/CacheEvictionTest.java

      }
    
      public void testEviction_maxSize() {
        CountingRemovalListener<Integer, Integer> removalListener = countingRemovalListener();
        IdentityLoader<Integer> loader = identityLoader();
        LoadingCache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .maximumSize(MAX_SIZE)
                .removalListener(removalListener)
                .build(loader);
        for (int i = 0; i < 2 * MAX_SIZE; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

            boolean accessOrder,
            long maximumSize,
            StatsCounter statsCounter,
            @Nullable RemovalListener<? super K, ? super V> removalListener) {
          super(initialCapacity, loadFactor, accessOrder);
          this.maximumSize = maximumSize;
          this.statsCounter = statsCounter;
          this.removalListener = removalListener;
        }
    
        @Override
        protected boolean removeEldestEntry(Entry<K, Timestamped<V>> ignored) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

      }
    
      public void testRemovalListener_setTwice() {
        RemovalListener<Object, Object> testListener = nullRemovalListener();
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().removalListener(testListener);
        assertThrows(IllegalStateException.class, () -> builder.removalListener(testListener));
      }
    
      public void testValuesIsNotASet() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

        assertEquals("keyEquivalence", a.keyEquivalence, b.keyEquivalence);
        assertEquals("keyStrength", a.keyStrength, b.keyStrength);
        assertEquals("removalListener", a.removalListener, b.removalListener);
        assertEquals("weigher", a.weigher, b.weigher);
        assertEquals("valueEquivalence", a.valueEquivalence, b.valueEquivalence);
        assertEquals("valueStrength", a.valueStrength, b.valueStrength);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        assertEquals(Integer.valueOf(50), asMap.get(10));
      }
    
      public void testRemovalListener() {
        final int[] stats = new int[4];
    
        RemovalListener<Integer, Integer> countingListener =
            new RemovalListener<Integer, Integer>() {
              @Override
              public void onRemoval(RemovalNotification<Integer, Integer> notification) {
                switch (notification.getCause()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

        assertEquals("keyEquivalence", a.keyEquivalence, b.keyEquivalence);
        assertEquals("keyStrength", a.keyStrength, b.keyStrength);
        assertEquals("removalListener", a.removalListener, b.removalListener);
        assertEquals("weigher", a.weigher, b.weigher);
        assertEquals("valueEquivalence", a.valueEquivalence, b.valueEquivalence);
        assertEquals("valueStrength", a.valueStrength, b.valueStrength);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
Back to top