Skip to content
Snippets Groups Projects
Commit 36bc039f authored by Ashwani Pandey's avatar Ashwani Pandey
Browse files

Removing these two classses to avoid conflicts call.These two file already part of core service.

parent d96eb9cb
No related branches found
No related tags found
1 merge request!616Ibm issue fix
/* Licensed Materials - Property of IBM */
/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/
package org.opengroup.osdu.indexer.ibm.cache;
import org.opengroup.osdu.core.common.cache.VmCache;
import org.opengroup.osdu.core.common.provider.interfaces.IIndexCache;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class IndexCache implements IIndexCache<String, Boolean> {
private VmCache<String, Boolean> cache;
public IndexCache(@Value("${INDEX_CACHE_EXPIRATION}") final String INDEX_CACHE_EXPIRATION,
@Value("${MAX_CACHE_VALUE_SIZE}") final String MAX_CACHE_VALUE_SIZE) {
cache = new VmCache<>(Integer.parseInt(INDEX_CACHE_EXPIRATION) * 60,
Integer.parseInt(MAX_CACHE_VALUE_SIZE));
}
@Override
public void put(String s, Boolean o) {
this.cache.put(s, o);
}
@Override
public Boolean get(String s) {
return this.cache.get(s);
}
@Override
public void delete(String s) {
this.cache.delete(s);
}
@Override
public void clearAll() {
this.cache.clearAll();
}
}
/* Licensed Materials - Property of IBM */
/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/
package org.opengroup.osdu.indexer.ibm.cache;
import org.opengroup.osdu.core.common.cache.VmCache;
import org.opengroup.osdu.indexer.provider.interfaces.ISchemaCache;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class SchemaCache implements ISchemaCache<String, String> {
private VmCache<String, String> cache;
public SchemaCache(@Value("${SCHEMA_CACHE_EXPIRATION}") final String SCHEMA_CACHE_EXPIRATION,
@Value("${MAX_CACHE_VALUE_SIZE}") final String MAX_CACHE_VALUE_SIZE) {
cache = new VmCache<>(Integer.parseInt(SCHEMA_CACHE_EXPIRATION) * 60,
Integer.parseInt(MAX_CACHE_VALUE_SIZE));
}
@Override
public void put(String s, String o) {
this.cache.put(s, o);
}
@Override
public String get(String s) {
return this.cache.get(s);
}
@Override
public void delete(String s) {
this.cache.delete(s);
}
@Override
public void clearAll() {
this.cache.clearAll();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment