@Test public void testRefreshMultiOverwrite() { List<Integer> keys = Arrays.asList(2, 4, 6, 8); List<Long> values = Arrays.asList(3L, 5L, 7L, 9L); for (int i = 0; i < 4; i++) { cache.set(makeKey(keys.get(i)), 1L); } sut.refresh(keys, values); for (int i = 0; i < 4; i++) { assertEquals(values.get(i), cache.get(makeKey(keys.get(i)))); } }
public void refresh(final List<TRequestType> inRequest, final List<Long> inResponse) { for (int i = 0; i < inRequest.size() && i < inResponse.size(); i++) { getCache().set(keyPrefix + inRequest.get(i).toString(), inResponse.get(i)); } }
MultiSetKeyedSingleValueCacheMapper extends CachedDomainMapper implements
        RefreshStrategy<List<TRequestType>, List<Long>> { public void refresh(final List<TRequestType> inRequest, final List<Long> inResponse) { for (int i = 0; i < inRequest.size() && i < inResponse.size(); i++) { getCache().set(keyPrefix + inRequest.get(i).toString(), inResponse.get(i)); } } }
MultiSetKeyedSingleValueCacheMapper extends CachedDomainMapper implements
        RefreshStrategy<List<TRequestType>, List<Long>> { public void refresh(final List<TRequestType> inRequest, final List<Long> inResponse) { for (int i = 0; i < inRequest.size() && i < inResponse.size(); i++) { getCache().set(keyPrefix + inRequest.get(i).toString(), inResponse.get(i)); } } MultiSetKeyedSingleValueCacheMapper(final String inKeyPrefix); }
MultiSetKeyedSingleValueCacheMapper extends CachedDomainMapper implements
        RefreshStrategy<List<TRequestType>, List<Long>> { public void refresh(final List<TRequestType> inRequest, final List<Long> inResponse) { for (int i = 0; i < inRequest.size() && i < inResponse.size(); i++) { getCache().set(keyPrefix + inRequest.get(i).toString(), inResponse.get(i)); } } MultiSetKeyedSingleValueCacheMapper(final String inKeyPrefix); void refresh(final List<TRequestType> inRequest, final List<Long> inResponse); }
MultiSetKeyedSingleValueCacheMapper extends CachedDomainMapper implements
        RefreshStrategy<List<TRequestType>, List<Long>> { public void refresh(final List<TRequestType> inRequest, final List<Long> inResponse) { for (int i = 0; i < inRequest.size() && i < inResponse.size(); i++) { getCache().set(keyPrefix + inRequest.get(i).toString(), inResponse.get(i)); } } MultiSetKeyedSingleValueCacheMapper(final String inKeyPrefix); void refresh(final List<TRequestType> inRequest, final List<Long> inResponse);  }