DurableClient.java has the client which connects to the DurableServer.java.
Ensure that before running this class the Server is up.
Prerequisites: Build the QuickStart(./build.sh compile-quickstart) and set
the CLASSPATH to include $GEMFIRE/quickstart/classes
Following are the steps to test the Durable Functionality.
- Start DurableServer - Here initializing keys key1,key2,key3,key4 with values K1,K2,K3,K4
- Start DurableClient
- Press Enter in the Server Window to update
- The values in the Server Cache are updated.
- Note the updates being passed onto client for all four keys (2 durable(key3,key4)and 2 non-durable(key1,key2))
- Press Enter in Client Window to see the values in client Cache.
- We find all the four Keys being updated.
- Program exits
- Restart the Client by running DurableClient.java
- Do update on the server by pressing enter in the server window.
- Note that only for key3,key4 (for which registerKeys was done as Durable) update is received in client window
- Press Enter in Client to get the Values
- we get values for key1,key2(non-durable) as null - for key3,key4 we get the updated Values.
To stop the server, type "Exit" in server console.