Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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