HazelCast Client Launched

And here we go again …

Another week, another client for Hazelcast is out. We started off with the Hazelcast simulator and then decided to automate the full launch of hazelcast.

Aim for the mountain, go for the moon.

This needed us to launch 1.1 version of our java client. So, do note that the latest dependency now is :

<dependency> 
 <groupId>cloud.configs</groupId> 
 <artifactId>ConfigsCloudClient</artifactId> 
 <version>1.1</version> 
</dependency>

This client version introduces a new parameter to the constructor – CacheProvider, with two options – CacheProvider.EHCACHE (default) (or) CacheProvider.HAZELCAST

I will be writing a new blog detailing steps to execute with examples. Let this be another brilliant start in a great journey.

Advertisements

Launching Java Client

After launching Unix Script client as one of the first ones, we now have a java client published to the Central Maven repository. This now allows all developers to simply get the client jar file and use readily.

As per the  product Architecture, caching for the KV pairs are at the client side. As of this java client, ehCache is the first caching implementation.  This will be further extended to other caching implementations in the consecutive releases.

Simply add the following lines to your pom.xml to get going

<dependency> 
 <groupId>cloud.configs</groupId> 
 <artifactId>ConfigsCloudClient</artifactId> 
 <version>1.0</version> 
</dependency>

Note: Keep an eye on the latest releases for the client versions. Lot more features are expected to be released in near future.

Once done, use the APIs as needed, for e.g.

// Initialize & Thats it ...
CloudConfigClient c = new CloudConfigClient("your_api_key", "https://app.configs.cloud");

// Fetch configs as needed
List configs = c.getConfigs(2); // Get all configs for entire Dataset
List configs = c.getConfigs("dev","myProject.projectKey"); // Get configs specific to an Environment
String configValue   = c.getConfigValue("myProject.projectKey");  // Get Config for a key

// Search configs by RegEx
List cd = c.searchConfigs("key==com.configs.cloud.x.*;iqk==y");
List cd = c.searchConfigs("key==com.configs.cloud.x.*");

// Update configs 
c.updateConfig("dev", "myProject.projectKey","Y");

Refer Client API Documentation for more information.

Do get in touch in case of any questions or queries.