flashcache

GemStone®
GemFire Enterprise®

Java Caching API Programming Example

The flashcacheexample is an interactive command-line
application that looks up NASDAQ stock symbols and displays current
quote information. A cache loader, QuoteLoader, is used to read
quotes from quotes.nasdaq.com and cache them in the distributed cache
for quicker access. The example is located in the GemFire installation
under examples/dist/flashcache

Before running this application, you need to configure your environment
according to the instructions provided under the GemFire installation
in examples/EnvSetup.html.

Once your environment is set, change to the examples/dist/flashcache
directory to run the application.

The application prompts for a NASDAQ stock symbol. Enter a symbol, such
as SUNW, to request a quote. Enter no symbol to exit. The cached
quotes are distributed to other GemFire caches connected to the same
distributed system. Optimistic distribution is used, so there is no
locking or acknowledgment of updates, and quotes are distributed
asynchronously. Here is a sample run, with command input in bold: