package org.ehcache.core.internal.resilience;
import org.ehcache.Cache;
import org.ehcache.spi.resilience.ResilienceStrategy;
import org.ehcache.spi.resilience.StoreAccessException;
import java.util.Map;
public class ThrowingResilienceStrategy<K, V> implements ResilienceStrategy<K, V> {
@Override
public V getFailure(K key, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public boolean containsKeyFailure(K key, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public void putFailure(K key, V value, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public void removeFailure(K key, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public void clearFailure(StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public Cache.Entry<K, V> iteratorFailure(StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public V putIfAbsentFailure(K key, V value, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public boolean removeFailure(K key, V value, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public V replaceFailure(K key, V value, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public boolean replaceFailure(K key, V value, V newValue, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public Map<K, V> getAllFailure(Iterable<? extends K> keys, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public void putAllFailure(Map<? extends K, ? extends V> entries, StoreAccessException e) {
throw new RuntimeException(e);
}
@Override
public void removeAllFailure(Iterable<? extends K> keys, StoreAccessException e) {
throw new RuntimeException(e);
}
}