1. Create a Simple Data Grid and Map on the XC10 console
Sign into the console
Click Data Grid->Simple Data Grid
Click the plus sign for a new Grid.
Give the Grid a Name.
2. Edit your env.bat or env.sh
Change the CATALOGSERVER_HOST and CATALOGSERVER_PORT to point to your XC10 machine.
Change the CATALOG_SERVICE_ENDPOINTS to point to your XC10 machine.
Change the GRID_NAME, MAP_NAME and COORD_MAP_NAME to what you gave your Grid Name.
An example would be GRID_NAME = Grid
MAP_NAME = Grid.CT
COORD_MAP_NAME = Grid.NONE
3. Open a terminal or command-line window:
Windows: set JAVA_HOME=<java home>
UNIX: export JAVA_HOME=<java home>
4. CD <installRoot>/ObjectGrid/samples/ContinuousQuery
5. Run the filter test:
Windows: runclient.bat filter
UNIX: ./runclient.sh filter
"Starting the Continuous Query Demo
Run the CQDemoGridWorker now..."
6. In another terminal, in the same directory, <installRoot>/ObjectGrid/samples/ContinuousQuerySample run the Worker test:
Windows: runclient.bat worker
UNIX: ./runclient.sh worker
The filter client will define a continuous query that should find anyone with first name Larry. As soon as the
worker client inserts this object into the grid, the filter finds it and prints it out.
The cache now contains the one existing customer named Larry.
Walk through the code and demo output to see more examples of the continuous query feature.
For information on loading and running this client in Eclipse,
refer to the provided ECLIPSE_README.txt file. You can use the Eclipse environment
to update and compile the sample and run the sample programmatically.
Please post any feedback on this sample as a comment on this page.