/** * Discards all cached principals. */ public void invalidateAll() { cache.invalidateAll(); }
/** * Discards any cached principal for the given collection of credentials. * * @param credentials a collection of credentials */ public void invalidateAll(Iterable<C> credentials) { cache.invalidateAll(credentials); }
/** * Discards all cached role associations. */ public void invalidateAll() { cache.invalidateAll(); }
/** * Discards any cached principal for the collection of credentials satisfying the given predicate. * * @param predicate a predicate to filter credentials */ public void invalidateAll(Predicate<? super C> predicate) { final Set<C> keys = cache.asMap().keySet().stream() .filter(predicate) .collect(Collectors.toSet()); cache.invalidateAll(keys); }
/** * Discards any cached role associations for principals satisfying * the given predicate. * * @param predicate a predicate to filter credentials */ public void invalidateAll(Predicate<? super P> predicate) { final Set<ImmutablePair<P, String>> keys = cache.asMap().keySet().stream() .filter(cacheKey -> predicate.test(cacheKey.getLeft())) .collect(Collectors.toSet()); cache.invalidateAll(keys); }
/** * Discards any cached role associations for the given collection * of principals. * * @param principals a list of principals */ public void invalidateAll(Iterable<P> principals) { final Set<P> principalSet = Sets.of(principals); final Set<ImmutablePair<P, String>> keys = cache.asMap().keySet().stream() .filter(cacheKey -> principalSet.contains(cacheKey.getLeft())) .collect(Collectors.toSet()); cache.invalidateAll(keys); }
/** * Discards any cached role associations for the given principal. * * @param principal */ public void invalidate(P principal) { final Set<ImmutablePair<P, String>> keys = cache.asMap().keySet().stream() .filter(cacheKey -> cacheKey.getLeft().equals(principal)) .collect(Collectors.toSet()); cache.invalidateAll(keys); }
@Override public void clear() { cache.invalidateAll(); }
/** * Resets the {@code ScriptEngine} but does not clear the loaded plugins or bindings. */ private void internalReset() { createClassLoader(); // must clear the local cache here because the classloader has been reset. therefore, classes previously // referenced before that might not have evaluated might cleanly evaluate now. classMap.invalidateAll(); globalClosures.clear(); }
@Override public void reloadCallback(String name, ConfigurationType type) { if(invalidateCacheOnReload) { if (cache != null) { cache.invalidateAll(); } } if(type == ConfigurationType.GLOBAL) { adapter.updateAdapter(getConfigurations().getGlobalConfig()); } }
@Override public void clear() { loadingCache.invalidateAll(); temporaryLoadingCache.invalidateAll(); }
@Override public void purge() { classes.invalidateAll(); objectProperties.invalidateAll(); dataProperties.invalidateAll(); datatypes.invalidateAll(); individuals.invalidateAll(); annotationProperties.invalidateAll(); annotations.invalidateAll(); }
@Override public void clearCache() { lock.lock(); try { if (actionMetaCache != null) { actionMetaCache.invalidateAll(); } } finally { lock.unlock(); } }
CacheKey cacheKey1 = new CacheKey("field1", "value1", sensorEnrichmentConfig); CacheKey cacheKey2 = new CacheKey("field2", "value2", sensorEnrichmentConfig); genericEnrichmentBolt.cache.invalidateAll(); when(enrichmentAdapter.getOutputPrefix(cacheKey1)).thenReturn("field1"); when(enrichmentAdapter.getOutputPrefix(cacheKey2)).thenReturn("field2"); genericEnrichmentBolt.cache.invalidateAll(); when(enrichmentAdapter.enrich(cacheKey1)).thenReturn(null); genericEnrichmentBolt.execute(tuple);
@VisibleForTesting public void enable(boolean enabled) { ChunkCache.enabled = enabled; cache.invalidateAll(); metrics.reset(); }
@VisibleForTesting public void enable(boolean enabled) { ChunkCache.enabled = enabled; cache.invalidateAll(); metrics.reset(); }
private void rebuildServerSet() { Set<String> memberIds = Collections.unmodifiableSet(new HashSet<>(servicesByMemberId.asMap().keySet())); servicesByMemberId.invalidateAll(); notifyGroupChange(memberIds); }
private void rebuildServerSet() { Set<String> memberIds = Collections.unmodifiableSet(new HashSet<>(servicesByMemberId.asMap().keySet())); servicesByMemberId.invalidateAll(); notifyGroupChange(memberIds); }
@InvokeOnHeader(CaffeineConstants.ACTION_INVALIDATE_ALL) public void onInvalidateAll(Message message) throws Exception { cache.invalidateAll(message.getHeader(CaffeineConstants.KEYS, Collections::emptySet, Set.class)); setResult(message, true, null, null); }
@ServerHandler(type = CorfuMsgType.FLUSH_CACHE) private void flushCache(CorfuMsg msg, ChannelHandlerContext ctx, IServerRouter r) { try { dataCache.invalidateAll(); } catch (RuntimeException e) { log.error("Encountered error while flushing cache {}", e); } r.sendResponse(ctx, msg, CorfuMsgType.ACK.msg()); }