// OnRemoveFilterSet sets which remove reasons will trigger a call to OnRemoveWithReason.
// Filtering out reasons prevents bigcache from unwrapping them, which saves cpu.
960758
func (c Config) OnRemoveFilterSet(reasons ...RemoveReason) Config {
	c.onRemoveFilter = 0
	for i := range reasons {
		c.onRemoveFilter |= 1 << uint(reasons[i])
	}

	return c
}
238463
func FilterHashes(h HashSet, f filter.Filter) HashSet {
	filtered := make(HashSet, 0)
	for _, e := range h {
		if !f.Match(e.Name) {
			filtered = append(filtered, e)
		}
	}
	log.Info("ignored", len(h)-len(filtered), "files")
	return filtered
}
100139
func (conf FilterConfigurator) Remove(target Filter) FilterConfigurator {
	conf.apply(func(fc []Filter) []Filter {
		return conf.rmFilter(target, fc)
	})
	return conf
}
758190
func (client *BaseClient) RemoveFilter(filter ...Filter) Client {
	client.filterManager.RemoveFilter(filter...)
	return client
}
174366
func (api *AutoBackupAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
1259979
func (fm *filterManager) SetFilter(filter ...Filter) {
	fm.fmLocker.Lock()
	fm.filters = make([]Filter, len(filter))
	fm.addFilter(filter...)
	fm.fmLocker.Unlock()
}
322695
func (api *IconAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
6823
func FilterStringSet(s map[string]bool, f func(x string) bool) map[string]bool {
	result := map[string]bool{}
	for k := range s {
		if f(k) {
			result[k] = true
		}
	}
	return result
}
732787
func cleanupAddressSet(addrs []ma.Multiaddr) []ma.Multiaddr {
	var public, private []ma.Multiaddr

	for _, a := range addrs {
		if isRelayAddr(a) {
			continue
		}

		if manet.IsPublicAddr(a) || isDNSAddr(a) {
			public = append(public, a)
			continue
		}

		// discard unroutable addrs
		if manet.IsPrivateAddr(a) {
			private = append(private, a)
		}
	}

	if !hasAddrsplosion(public) {
		return public
	}

	return sanitizeAddrsplodedSet(public, private)
}
1182530
func FilterActiveReplicaSets(replicaSets []*apps.ReplicaSet) []*apps.ReplicaSet {
	activeFilter := func(rs *apps.ReplicaSet) bool {
		return rs != nil && *(rs.Spec.Replicas) > 0
	}
	return FilterReplicaSets(replicaSets, activeFilter)
}
518537
func (fs *KBFSOpsStandard) ClearCachedFavorites(ctx context.Context) {
	timeTrackerDone := fs.longOperationDebugDumper.Begin(ctx)
	defer timeTrackerDone()

	fs.favs.ClearCache(ctx)
}
537709
func (e *Store) deleteWithoutFinalizers(ctx context.Context, name, key string, obj runtime.Object, preconditions *storage.Preconditions, dryRun bool) (runtime.Object, bool, error) {
	out := e.NewFunc()
	klog.V(6).Infof("going to delete %s from registry, triggered by update", name)
	if err := e.Storage.Delete(ctx, key, out, preconditions, dryRun); err != nil {
		// Deletion is racy, i.e., there could be multiple update
		// requests to remove all finalizers from the object, so we
		// ignore the NotFound error.
		if storage.IsNotFound(err) {
			_, err := e.finalizeDelete(ctx, obj, true)
			// clients are expecting an updated object if a PUT succeeded,
			// but finalizeDelete returns a metav1.Status, so return
			// the object in the request instead.
			return obj, false, err
		}
		return nil, false, storeerr.InterpretDeleteError(err, e.qualifiedResourceFromContext(ctx), name)
	}
	_, err := e.finalizeDelete(ctx, out, true)
	// clients are expecting an updated object if a PUT succeeded, but
	// finalizeDelete returns a metav1.Status, so return the object in
	// the request instead.
	return obj, false, err
}
1315642
func (e *Enforcer) RemoveFilteredGroupingPolicy(fieldIndex int, fieldValues ...string) bool {
	return e.RemoveFilteredNamedGroupingPolicy("g", fieldIndex, fieldValues...)
}
1354746
func (s *SearchExpression) SetNestedFilters(v []*NestedFilters) *SearchExpression {
	s.NestedFilters = v
	return s
}
577079
func (c *Client) DeletePrefilter(spec *models.PrefilterSpec) error {
	current, err := c.GetPrefilter()
	if err != nil {
		return Hint(err)
	}

	deleteSet := map[string]bool{}
	keepList := []string{}
	for _, delCIDR := range spec.Deny {
		deleteSet[delCIDR] = true
	}

	if current.Status != nil && current.Status.Realized != nil {
		for _, keepCIDR := range current.Status.Realized.Deny {
			if !deleteSet[keepCIDR] {
				keepList = append(keepList, keepCIDR)
			}
		}
	}

	update := current.Status.Realized
	update.Deny = keepList
	_, err = c.PatchPrefilter(update)
	return Hint(err)
}
85402
func (s *Set) Filter(fn func(interface{}) bool) *Set {
	// Create a set to return with elements which match filter function
	filterSet := New()

	// Enumerate all elements and apply the function
	for _, e := range s.Enumerate() {
		// Apply the function, add elements which it matches
		if fn(e) {
			filterSet.Add(e)
		}
	}

	return filterSet
}
1025715
func (opts *BlockBasedTableOptions) SetCacheIndexAndFilterBlocks(value bool) {
	C.rocksdb_block_based_options_set_cache_index_and_filter_blocks(opts.c, boolToChar(value))
}