com.helger.phive.api.execute.IValidationExecutorCacheSupport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phive-api Show documentation
Show all versions of phive-api Show documentation
phive - Philip Helger Integrative Validation Engine API
The newest version!
/*
* Copyright (C) 2014-2024 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.phive.api.execute;
import javax.annotation.Nonnull;
/**
* Interface for validation executors that support caching. Each implementation
* of IValidationExecutor is free to also implement this interface.
*
* @author Philip Helger
* @since 3.1.1
*/
public interface IValidationExecutorCacheSupport
{
/** By default caching should be enabled. */
boolean DEFAULT_CACHE = true;
/**
* @return true
if caching is enabled, false
if not.
*/
boolean isCacheArtefact ();
/**
* Enable or disable caching.
*
* @param bCacheArtefact
* true
to enable caching, false
to disable
* it.
* @return this for chaining
*/
@Nonnull
IValidationExecutorCacheSupport setCacheArtefact (boolean bCacheArtefact);
/**
* If caching of this artefact is enabled, ensure it is in the cache.
*
* @since 7.1.1
*/
void ensureItemIsInCache ();
}