/** * Removes the given key from the specified cache. * <p> * @param cacheName * @param key * @throws IOException */ @Override public void remove( String cacheName, K key ) throws IOException { remove( cacheName, key, 0 ); }
/** * Removes the given key from the specified cache. * <p> * @param cacheName * @param key * @throws IOException */ @Override public void remove( String cacheName, K key ) throws IOException { remove( cacheName, key, 0 ); }
/** * Verify remove functionality * <p> * @throws IOException */ public void testRemove_normal() throws IOException { // SETUP RemoteHttpCacheAttributes attributes = new RemoteHttpCacheAttributes(); RemoteHttpCacheClient<String, String> client = new RemoteHttpCacheClient<String, String>( attributes ); MockRemoteCacheDispatcher mockDispatcher = new MockRemoteCacheDispatcher(); client.setRemoteDispatcher( mockDispatcher ); String cacheName = "test"; String key = "key"; // DO WORK client.remove( cacheName, key ); // VERIFY assertEquals( "Wrong type.", RemoteRequestType.REMOVE, mockDispatcher.lastRemoteCacheRequest .getRequestType() ); }
/** * Verify remove functionality * <p> * @throws IOException */ public void testRemove_normal() throws IOException { // SETUP RemoteHttpCacheAttributes attributes = new RemoteHttpCacheAttributes(); RemoteHttpCacheClient<String, String> client = new RemoteHttpCacheClient<String, String>( attributes ); MockRemoteCacheDispatcher mockDispatcher = new MockRemoteCacheDispatcher(); client.setRemoteDispatcher( mockDispatcher ); String cacheName = "test"; String key = "key"; // DO WORK client.remove( cacheName, key ); // VERIFY assertEquals( "Wrong type.", RemoteRequestType.REMOVE, mockDispatcher.lastRemoteCacheRequest .getRequestType() ); }