public class CacheWorker extends Object
Every 30 seconds, the internal worker thread will wake up and put 10 cache entries in the exampleRegion. Since the exampleRegion is defined in the cache.xml as having an expiration of 10 seconds, these entries will then be destroyed 10 seconds later. This continues for as long as the CacheWorker is running.
After performing the cache puts, the internal worker thread will also perform a query and print the results before sleeping.
| Constructor and Description |
|---|
CacheWorker() |
public void start()
throws IOException
IOExceptionpublic void stop()
throws InterruptedException
InterruptedExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.