use of cn.taketoday.retry.context.RetryContextSupport in project today-framework by TAKETODAY.
the class MapRetryContextCacheTests method testPut.
@Test
public void testPut() {
RetryContextSupport context = new RetryContextSupport(null);
cache.put("foo", context);
assertEquals(context, cache.get("foo"));
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-framework by TAKETODAY.
the class MapRetryContextCacheTests method testRemove.
@Test
public void testRemove() {
assertFalse(cache.containsKey("foo"));
RetryContextSupport context = new RetryContextSupport(null);
cache.put("foo", context);
assertTrue(cache.containsKey("foo"));
cache.remove("foo");
assertFalse(cache.containsKey("foo"));
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-framework by TAKETODAY.
the class SoftReferenceMapRetryContextCacheTests method testPut.
@Test
public void testPut() {
RetryContextSupport context = new RetryContextSupport(null);
cache.put("foo", context);
assertEquals(context, cache.get("foo"));
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-framework by TAKETODAY.
the class SoftReferenceMapRetryContextCacheTests method testRemove.
@Test
public void testRemove() {
assertFalse(cache.containsKey("foo"));
RetryContextSupport context = new RetryContextSupport(null);
cache.put("foo", context);
assertTrue(cache.containsKey("foo"));
cache.remove("foo");
assertFalse(cache.containsKey("foo"));
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-framework by TAKETODAY.
the class BinaryExceptionClassifierRetryPolicy method registerThrowable.
@Override
public void registerThrowable(RetryContext context, Throwable throwable) {
RetryContextSupport simpleContext = ((RetryContextSupport) context);
simpleContext.registerThrowable(throwable);
}
Aggregations