if (inMemory != null) {
return new InMemoryDataStore();
}
final JsonNode redis = dataStore.get("redis");
if (redis != null) {
return new RedisDataStore(redis.get("host").asText(), redis.get("port").asInt());
}
final JsonNode couchdb = dataStore.get("couchdb");
if (couchdb != null) {
return new CouchDBDataStore(couchdb.get("url").asText(), couchdb.get("dbName").asText());
}