Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for notifications (0.18 sec)

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

        assertEquals("Map must be empty by now", 0, cache.size());
        assertEquals("Eviction notifications must be received", 10, removalListener.getCount());
    
        CacheTesting.expireEntries((LoadingCache<?, ?>) cache, EXPIRING_TIME, ticker);
        // ensure that no new notifications are sent
        assertEquals("Eviction notifications must be received", 10, removalListener.getCount());
      }
    
      public void testExpiringGet_expireAfterWrite() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java

        List<RemovalNotification<Integer, Integer>> notifications = new ArrayList<>();
        Cache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .removalListener(
                    new RemovalListener<Integer, Integer>() {
                      @Override
                      public void onRemoval(RemovalNotification<Integer, Integer> notification) {
                        notifications.add(notification);
                      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        assertEquals("Map must be empty by now", 0, cache.size());
        assertEquals("Eviction notifications must be received", 10, removalListener.getCount());
    
        CacheTesting.expireEntries((LoadingCache<?, ?>) cache, EXPIRING_TIME, ticker);
        // ensure that no new notifications are sent
        assertEquals("Eviction notifications must be received", 10, removalListener.getCount());
      }
    
      public void testExpiringGet_expireAfterWrite() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/cache/RemovalListeners.java

    public final class RemovalListeners {
    
      private RemovalListeners() {}
    
      /**
       * Returns a {@code RemovalListener} which processes all eviction notifications using {@code
       * executor}.
       *
       * @param listener the backing listener
       * @param executor the executor with which removal notifications are asynchronously executed
       */
      public static <K, V> RemovalListener<K, V> asynchronous(
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Oct 01 16:02:17 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        // other operations, the cache and the removal queue won't change from this point on.
    
        // Verify that each received removal notification was valid
        for (RemovalNotification<String, String> notification : removalListener) {
          assertEquals("Invalid removal notification", notification.getKey(), notification.getValue());
        }
    
        CacheStats stats = cache.stats();
        assertEquals(removalListener.size(), stats.evictionCount());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/RemovalListeners.java

    public final class RemovalListeners {
    
      private RemovalListeners() {}
    
      /**
       * Returns a {@code RemovalListener} which processes all eviction notifications using {@code
       * executor}.
       *
       * @param listener the backing listener
       * @param executor the executor with which removal notifications are asynchronously executed
       */
      public static <K, V> RemovalListener<K, V> asynchronous(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 01 16:02:17 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/LocalCacheTest.java

        List<RemovalNotification<Object, Object>> notifications = new ArrayList<>();
        RemovalListener<Object, Object> removalListener =
            new RemovalListener<Object, Object>() {
              @Override
              public void onRemoval(RemovalNotification<Object, Object> notification) {
                notifications.add(notification);
              }
            };
        Cache<Object, Object> cache =
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 112.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        // other operations, the cache and the removal queue won't change from this point on.
    
        // Verify that each received removal notification was valid
        for (RemovalNotification<String, String> notification : removalListener) {
          assertEquals("Invalid removal notification", notification.getKey(), notification.getValue());
        }
    
        CacheStats stats = cache.stats();
        assertEquals(removalListener.size(), stats.evictionCount());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

          QueuingRemovalListener<K, V> listener, K key, V value, RemovalCause cause) {
        RemovalNotification<K, V> notification = listener.remove();
        assertSame(key, notification.getKey());
        assertSame(value, notification.getValue());
        assertSame(cause, notification.getCause());
      }
    
      // Segment core tests
    
      public void testNewEntry() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 110.7K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/LocalCache.java

       * evictEntry is called (once the lock is released).
       */
      void processPendingNotifications() {
        RemovalNotification<K, V> notification;
        while ((notification = removalNotificationQueue.poll()) != null) {
          try {
            removalListener.onRemoval(notification);
          } catch (Throwable e) {
            logger.log(Level.WARNING, "Exception thrown by removal listener", e);
          }
        }
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
Back to top