
sirius.kernel.cache.ValueVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirius-kernel Show documentation
Show all versions of sirius-kernel Show documentation
Provides common core classes and the microkernel powering all Sirius applications
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package sirius.kernel.cache;
import javax.annotation.Nullable;
/**
* Checks if a cached value is still valid
*
* Can be supplied to {@link CacheManager#createLocalCache(String, ValueComputer, ValueVerifier)} or
* {@link CacheManager#createCoherentCache(String, ValueComputer, ValueVerifier)} when creating a cache to verify
* values before returning them to the caller.
*
* @param the value type determining the type of values stored in the cache
*/
public interface ValueVerifier {
/**
* Verifies the given value
*
* @param value the value to be verified
* @return true if the value is still valid, false otherwise
*/
boolean valid(@Nullable V value);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy