All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ehcache.spi.resilience.RecoveryStore Maven / Gradle / Ivy

There is a newer version: 3.10.8
Show newest version
/*
 * Copyright Terracotta, Inc.
 *
 * 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 org.ehcache.spi.resilience;

import org.ehcache.spi.resilience.StoreAccessException;

/**
 * A recovery store is used during entry cleanup done by the {@link ResilienceStrategy}. It's called
 * when a {@link org.ehcache.core.spi.store.Store} failed on an entry. Implementations will in general want to get rid
 * of this entry which is what the recovery store is used for.
 * 

* Note that the methods on this call with tend to fail since the store already failed once and caused the resilience * strategy to be called. * * @param store key type */ public interface RecoveryStore { /** * Obliterate all keys in a store. * * @throws StoreAccessException in case of store failure */ void obliterate() throws StoreAccessException; /** * Obliterate a given key. * * @param key the key to obliterate * @throws StoreAccessException in case of store failure */ void obliterate(K key) throws StoreAccessException; /** * Obliterate a list of keys. * * @param keys keys to obliterate * @throws StoreAccessException in case of store failure */ default void obliterate(Iterable keys) throws StoreAccessException { for (K key : keys) { obliterate(key); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy