1 package com.atlassian.vcache.internal;
2
3 import com.atlassian.vcache.ExternalCacheException;
4
5 /**
6 * Called whenever an {@link ExternalCacheException} is being thrown.
7 * This is to allow the opportunity to record metrics.
8 * Implementations of this interface should not throw an exception.
9 *
10 * @since 1.12.0
11 */
12 public interface ExternalCacheExceptionListener {
13
14 /**
15 * Called when the supplied exception is about to be thrown.
16 * @param cacheName the name of the cache associated with the exception
17 * @param ex the exception to be thrown
18 */
19 void onThrow(String cacheName, ExternalCacheException ex);
20 }