in cq/src/main/java/org/apache/geode_examples/cq/Example.java [101:120]
private void startPuttingData(Region region) throws InterruptedException {
// Example will run for 20 second
Stopwatch stopWatch = Stopwatch.createStarted();
while (stopWatch.elapsed(TimeUnit.SECONDS) < 20) {
// 500ms delay to make this easier to follow
Thread.sleep(500);
int randomKey = ThreadLocalRandom.current().nextInt(0, 99 + 1);
int randomValue = ThreadLocalRandom.current().nextInt(0, 100 + 1);
region.put(randomKey, randomValue);
System.out.println("Key: " + randomKey + " Value: " + randomValue);
}
stopWatch.stop();
}