Skip to content

Samples used for the Java Colombo Meetup on Distributed Caching with Java

License

Notifications You must be signed in to change notification settings

kasunbg/jcache-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jcache-samples

This contains the samples used for the Java Colombo Meetup on Distributed Caching with Java. [1] This demonstrates the use of Javax JCache with Hazelcast as the caching server. Hazelcast is running in client-server mode where the Hazelcast cluster instances are running separately from the Application. It is also possible to run Hazelcast in embedded mode where the application and the Hazelcast instance reside within the same JVM.

[1] http://www.meetup.com/java-colombo/events/223811796/

This has three maven modules. Each module can be run by executing the following command.

mvn test -Prun

  1. cache-server-starter - Starts a hazelcast instance which will act as a distributed caching server. Run mvn test -Prun two-three times to get a Hazelcast cluster with two to three nodes.
  2. cache-setter - This creates a cache, and adds a set of objects to it.
  3. cache-getter - This reads the set of objects to it that was added by cache-setter module.

You can analyze the cache usage across the distributed cluster nodes via the Hazelcast Mancenter.

To run mancenter,

  1. Download Hazelcast, and Unpack the distribution.
  2. Go to hazelcast-x.x/mancenter/
  3. Execute the command.

In Linux - ./startManCenter.sh 8080 mancenter

In Windows - ./startManCenter.bat 8080 mancenter (not tested)

  1. Spin up a hazelcast cluster, if not done so already.
  2. Point your browser to http://localhost:8080/mancenter.

About

Samples used for the Java Colombo Meetup on Distributed Caching with Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages