@Test public void testSetMaxAttempts() throws Exception { RetryingCacheProxy cache = new RetryingCacheProxy(); assertNull(cache.getMaxAttempts()); assertEquals(2, cache.maxAttempts()); cache.setMaxAttempts(10); assertEquals(Integer.valueOf(10), cache.getMaxAttempts()); assertEquals(10, cache.maxAttempts()); cache.setMaxAttempts(null); assertNull(cache.getMaxAttempts()); assertEquals(2, cache.maxAttempts()); }
public void setMaxAttempts(Integer max) { this.maxAttempts = max; }
RetryingCacheProxy implements Cache { public void setMaxAttempts(Integer max) { this.maxAttempts = max; } }
RetryingCacheProxy implements Cache { public void setMaxAttempts(Integer max) { this.maxAttempts = max; } RetryingCacheProxy();  RetryingCacheProxy(Cache cache); }
RetryingCacheProxy implements Cache { public void setMaxAttempts(Integer max) { this.maxAttempts = max; } RetryingCacheProxy();  RetryingCacheProxy(Cache cache); @Override void init(); @Override void close(); @Override void start(); @Override void stop(); @Override void put(String key, Serializable value); @Override void put(String key, Object value); @Override Object get(String key); @Override void remove(String key); @Override List<String> getKeys(); @Override void clear(); @Override int size(); Cache getProxiedCache(); void setProxiedCache(Cache c); Integer getMaxAttempts(); void setMaxAttempts(Integer max); TimeInterval getRetryInterval(); void setRetryInterval(TimeInterval t); RetryingCacheProxy withMaxAttempts(Integer i); RetryingCacheProxy withRetryInterval(TimeInterval i); RetryingCacheProxy withProxiedCache(Cache c); }
RetryingCacheProxy implements Cache { public void setMaxAttempts(Integer max) { this.maxAttempts = max; } RetryingCacheProxy();  RetryingCacheProxy(Cache cache); @Override void init(); @Override void close(); @Override void start(); @Override void stop(); @Override void put(String key, Serializable value); @Override void put(String key, Object value); @Override Object get(String key); @Override void remove(String key); @Override List<String> getKeys(); @Override void clear(); @Override int size(); Cache getProxiedCache(); void setProxiedCache(Cache c); Integer getMaxAttempts(); void setMaxAttempts(Integer max); TimeInterval getRetryInterval(); void setRetryInterval(TimeInterval t); RetryingCacheProxy withMaxAttempts(Integer i); RetryingCacheProxy withRetryInterval(TimeInterval i); RetryingCacheProxy withProxiedCache(Cache c);  }