This method returns an array of Invalidation objects that written custom Java code or through
rules that are defined in the cache policy of each entry.

@return Array of Invalidation objects
17969
public Invalidation[] getInvalidations(){
		Invalidation[] invalidations = new Invalidation[configEntry.invalidations.length];
		for ( int i=0; i<configEntry.invalidations.length; i++ ){
			invalidations[i] = new Invalidation(configEntry.invalidations[i]);
		}
		return invalidations;
	}
722514
public function getValidationErrors()
    {
        if ($this->isValid()) {
            return [];
        }
        
        // if it's already cached, just return it
        if (count($this->validationErrors) > 0) {
            return $this->validationErrors;
        }


        // All errors can be spotted in the fields
        foreach ($this->getFields() as $field) {
            if (!$field->isValid()) {
                $this->validationErrors[$field->getName()] = $field->getErrors(true);
            }
        }

        return $this->validationErrors;
    }
676186
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);
    }
398774
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);
    }
914515
public function getFlattenValidators()
    {
        if (!$this->exists) {
            return [];
        }

        $validators = $this->validators;
        $return     = [];
        if (!empty($validators)) {
            foreach ($validators as $validator) {
                $return[$validator->validator_id] = $validator->value;
            }
        }
        return $return;
    }
1030290
protected function getCachePolicy()
    {
        $defaults = [
            'insert' => false,
            'update' => false,
            'not_found' => false,
        ];

        if (!$this->hasOption('cache_policy')) {
            return $defaults;
        }

        $policy = $this->getOption('cache_policy');

        if (is_array($policy)) {
            return array_merge($defaults, $policy);
        }

        if (DEBUG) {
            throw new \Exception('Invalid cache policy setting');
        }

        return $defaults;
    }
239293
public function makeValid(): array {
        if ($this->isValid()) {
            return array($this);
        }

        $ret = array();
        foreach ($this->resources as $uri => $res) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array($uri => $res);
            $tmp->classes   = array();
            $ret[]          = $tmp;
        }
        foreach ($this->classes as $class) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array();
            $tmp->classes   = array($class => $class);
            $ret[]          = $tmp;
        }
        return $ret;
    }
309157
public function getMessages()
    {
        if ($this->invalidDataTypeException !== null) {
            return array(
                'invalidType' => sprintf(
                    'Value must be an array or Traversable object; received %s',
                    is_object($this->invalidData) ? get_class($this->invalidData) : gettype($this->invalidData)
                )
            );
        }

        return parent::getMessages();
    }
242727
@Override
    public Object[] getParameters() {
        // return the parameters as used for the rule validation
        Object[] params = new Object[2];
        if (pattern == null)
            params[0] = null;
        else {
            List<double[]> params0 = new ArrayList<double[]>();
            for (IsotopeContainer isotope : pattern.getIsotopes()) {
                params0.add(new double[] { isotope.getMass(), isotope.getIntensity() });
            }
            params[0] = params0;
        }
        params[1] = toleranceMass;
        return params;
    }
817618
private final CacheEntry internalFilterEntry(String cacheName, InvalidationTableList invalidationTableList, CacheEntry cacheEntry) {
		InvalidateByIdEvent idEvent = null;
		if (cacheEntry == null) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered cacheName=" + cacheName + " CE == NULL");
			}
			return null;
		} else if (cacheEntry.id == null) {		
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered cacheName=" + cacheName + " id == NULL");
			}
		    return null;
		}

		long timeStamp = cacheEntry.getTimeStamp();
		idEvent = (InvalidateByIdEvent) invalidationTableList.presentIdSet.get(cacheEntry.id);
		if ((idEvent != null) && (idEvent.getTimeStamp() > timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered Found a more recent InvalidateByIdEvent for the cacheEntry in presentIdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		if (collision(invalidationTableList.presentTemplateSet, cacheEntry.getTemplates(), timeStamp) || collision(invalidationTableList.presentIdSet, cacheEntry.getDataIds(), timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered due to preexisting invalidations due to dependencies and templates in present template and IdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		if (timeStamp > lastTimeCleared) {
			return cacheEntry;
		}
		//else check past values as well
		idEvent = (InvalidateByIdEvent) invalidationTableList.pastIdSet.get(cacheEntry.id);

		if ((idEvent != null) && (idEvent.getTimeStamp() > timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered Found a more recent InvalidateByIdEvent for the cacheEntry in pastIdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		if (collision(invalidationTableList.pastTemplateSet, cacheEntry.getTemplates(), timeStamp) || collision(invalidationTableList.pastIdSet, cacheEntry.getDataIds(), timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered due to preexisting invalidations due to dependencies and templates in past template and IdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		return cacheEntry;
	}
1212240
public function listInvalidProperties()
    {
        $invalidProperties = [];

        $allowedValues = $this->getGradeAllowableValues();
        if (!in_array($this->container['grade'], $allowedValues)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'grade', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getSubjectAllowableValues();
        if (!in_array($this->container['subject'], $allowedValues)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'subject', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        return $invalidProperties;
    }
278881
public static function invalidateCaches()
    {
        $cache = Craft::$app->getCache();
        TagDependency::invalidate($cache, self::CACHE_TAG);
        Craft::info('All manifest caches cleared', __METHOD__);
    }
164703
public function validate(): array
	{
		if($this->isInvalid())
		{
			throw new ValidationException($this->errors, 'Invalid input.');
		}

		$validated = [];

		foreach(array_keys($this->ruleSets) as $validatedKey)
		{
			if(Arr::has($this->input, $validatedKey))
			{
				Arr::set($validated, $validatedKey, Arr::get($this->input, $validatedKey));
			}
		}

		return $validated;
	}
572267
public function listInvalidProperties()
    {
        $invalidProperties = [];

        if (!is_null($this->container['division']) && ($this->container['division'] > 7)) {
            $invalidProperties[] = "invalid value for 'division', must be smaller than or equal to 7.";
        }

        if (!is_null($this->container['division']) && ($this->container['division'] < 1)) {
            $invalidProperties[] = "invalid value for 'division', must be bigger than or equal to 1.";
        }

        if (!is_null($this->container['name']) && (strlen($this->container['name']) > 50)) {
            $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50.";
        }

        return $invalidProperties;
    }
466316
@Override
    public String[] invalidateCacheIDs(String cacheInstance, String pattern, boolean waitOnInvalidation) throws javax.management.AttributeNotFoundException {

        // Get the cache for this cacheInstance
        DCache cache1 = getCache(cacheInstance);

        //Check to see if request is to clear the cache
        if (pattern.equals("*")) {
            cache1.clear();
            if (tc.isDebugEnabled())
                Tr.debug(tc, "invalidateCacheIDs: Exiting. Cleared memory and disk cache since input pattern is *");
            return new String[] { "*" };
        }

        // Check that the input pattern is a valid regular expression
        Pattern cpattern = checkPattern(pattern);

        // Get union of matches in memory and on disk
        Collection<String> invalidateSet = new ArrayList<String>();

        // Call mbeans to get matches in memory and on disk.
        String[] memoryMatches = getCacheIDsInMemory(cacheInstance, pattern);
        if (null != memoryMatches) {
            for (int i = 0; i < memoryMatches.length; i++) {
                invalidateSet.add(memoryMatches[i]);
            }
        }
        if (cache1.getSwapToDisk()) {
            String[] diskMatches = getCacheIDsOnDisk(cacheInstance, pattern);
            if (null != diskMatches) {
                for (int i = 0; i < diskMatches.length; i++) {
                    invalidateSet.add(diskMatches[i]);
                }
            }
        }

        Iterator invalidates = invalidateSet.iterator();
        // Invalidate the set of cache ids matched to the pattern and all
        // entries dependent on the matched entry
        while (invalidates.hasNext()) {
            Object cacheID = invalidates.next();
            cache1.invalidateById(cacheID, waitOnInvalidation);
        }

        if (tc.isDebugEnabled())
            Tr.debug(tc, "invalidateCacheIDs: Exiting. Number of matches found = " + invalidateSet.size());

        //need to convert to string array before return.
        //Allocate output array #entries matched 
        String[] cids = invalidateSet.toArray(new String[invalidateSet.size()]);
        return cids;
    }
1227080
public function listInvalidProperties()
    {
        $invalidProperties = [];

        $allowedValues = $this->getHighGradeAllowableValues();
        if (!in_array($this->container['high_grade'], $allowedValues)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'high_grade', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getLowGradeAllowableValues();
        if (!in_array($this->container['low_grade'], $allowedValues)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'low_grade', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        return $invalidProperties;
    }
826287
protected function getInformationNeededForInitializeActionMethodValidators()
    {
        return [
            static::getActionValidationGroups($this->objectManager),
            static::getActionMethodParameters($this->objectManager),
            static::getActionValidateAnnotationData($this->objectManager),
            static::getActionIgnoredValidationArguments($this->objectManager)
        ];
    }