Skip to content

Instantly share code, notes, and snippets.

@takabow
Created December 20, 2013 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takabow/8052386 to your computer and use it in GitHub Desktop.
Save takabow/8052386 to your computer and use it in GitHub Desktop.
import com.tangosol.net.CacheFactory;
import com.tangosol.net.NamedCache;
public class TestClient {
public static void main(String[] args) {
NamedCache cache = CacheFactory.getCache("TestCache");
System.out.println("TestClient.main() - put data to the TestCache");
for (int i = 0; i < 50; ++i) {
cache.put("Testkey" + i, "value" + i);
}
System.out.println("TestClient.main() - Clear TestCache");
cache.clear();
for (int i = 0; i < 50; ++i) {
System.out.println("TestClient.main() - Get key=Testkey" + i + ", value=" + cache.get("Testkey" + i));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment