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.

Advertisements