O'Reilly logo

Getting Started with Hazelcast by Mat Johns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Showing off straightaway

Within the Hazelcast JAR, there is the very useful utility class TestApp. The class name is a little deceptive as it can be used in more ways than just testing, but its greatest offering is that it provides a simple text console for easy access to distributed collections.

To fire this up, we need to run this class using the Hazelcast JAR as the classpath.

$ java -cp hazelcast-2.6.jar com.hazelcast.examples.TestApp

This should bring up a fair amount of verbose logging, but a reassuring section to look for to show that a cluster has been formed is the following code:

Members [1] {
    Member [127.0.0.1]:5701 this
}

This lets us know that a new cluster of one node has been created with the node indicated by this. The configuration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required