Commit 529bd159 authored by Krishna Nikhil Vedurumudi's avatar Krishna Nikhil Vedurumudi
Browse files

Redis Azure poc

parent 52061cc1
Pipeline #88393 failed with stages
in 7 seconds
......@@ -33,7 +33,7 @@
<azure.appservice.plan />
<azure.appservice.appname />
<azure.appservice.subscription />
<osdu.corelibazure.version>0.13.0-vib-123-SNAPSHOT</osdu.corelibazure.version>
<osdu.corelibazure.version>0.13.0-redis-SNAPSHOT</osdu.corelibazure.version>
<osdu.storage-core.version>0.13.0-SNAPSHOT</osdu.storage-core.version>
<junit.version>4.12</junit.version>
<mockito.version>1.10.19</mockito.version>
......
......@@ -14,6 +14,7 @@
package org.opengroup.osdu.storage.provider.azure.cache;
import org.opengroup.osdu.azure.cache.RedisAzureCache;
import org.opengroup.osdu.core.common.cache.RedisCache;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
......@@ -23,14 +24,8 @@ import javax.inject.Named;
@Component("CursorCache")
@ConditionalOnProperty(value = "runtime.env.local", havingValue = "false", matchIfMissing = true)
public class CursorRedisCache extends RedisCache<String, String> {
public CursorRedisCache(
final @Named("REDIS_HOST") String host,
final @Named("REDIS_PORT") int port,
final @Named("REDIS_PASSWORD") String password,
final @Named("CURSOR_REDIS_TTL") int timeout,
@Value("${redis.database}") final int database) {
super(host, port, password, timeout, database, String.class, String.class);
public class CursorRedisCache extends RedisAzureCache<String, String> {
public CursorRedisCache() {
super(String.class, String.class);
}
}
......@@ -14,25 +14,15 @@
package org.opengroup.osdu.storage.provider.azure.cache;
import org.opengroup.osdu.core.common.cache.RedisCache;
import org.opengroup.osdu.azure.cache.RedisAzureCache;
import org.opengroup.osdu.core.common.model.entitlements.Groups;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import javax.inject.Named;
@Component
@ConditionalOnProperty(value = "runtime.env.local", havingValue = "false", matchIfMissing = true)
public class GroupRedisCache extends RedisCache<String, Groups> {
public GroupRedisCache(
final @Named("REDIS_HOST") String host,
final @Named("REDIS_PORT") int port,
final @Named("REDIS_PASSWORD") String password,
final @Named("GROUP_REDIS_TTL") int timeout,
@Value("${redis.database}") final int database)
{
super(host, port, password, timeout, database, String.class, Groups.class);
public class GroupRedisCache extends RedisAzureCache<String, Groups> {
public GroupRedisCache() {
super(String.class, Groups.class);
}
}
\ No newline at end of file
......@@ -14,6 +14,7 @@
package org.opengroup.osdu.storage.provider.azure.cache;
import org.opengroup.osdu.azure.cache.RedisAzureCache;
import org.opengroup.osdu.core.common.cache.RedisCache;
import org.opengroup.osdu.core.common.model.storage.Schema;
import org.springframework.beans.factory.annotation.Value;
......@@ -24,15 +25,8 @@ import javax.inject.Named;
@Component
@ConditionalOnProperty(value = "runtime.env.local", havingValue = "false", matchIfMissing = true)
public class SchemaRedisCache extends RedisCache<String, Schema> {
public SchemaRedisCache(
final @Named("REDIS_HOST") String host,
final @Named("REDIS_PORT") int port,
final @Named("REDIS_PASSWORD") String password,
final @Named("SCHEMA_REDIS_TTL") int timeout,
@Value("${redis.database}") final int database)
{
super(host, port, password, timeout, database, String.class, Schema.class);
public class SchemaRedisCache extends RedisAzureCache<String, Schema> {
public SchemaRedisCache() {
super(String.class, Schema.class);
}
}
\ No newline at end of file
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
runtime.env.local=true
runtime.env.local=false
azure.activedirectory.client-id=${aad_client_id}
azure.activedirectory.AppIdUri=api://${azure.activedirectory.client-id}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment