aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/music/main/CachingUtil.java
diff options
context:
space:
mode:
authorTschaen, Brendan <ctschaen@att.com>2018-11-15 10:31:53 -0500
committerTschaen, Brendan <ctschaen@att.com>2018-11-15 10:32:38 -0500
commita1f03a639a2ba38ec5c19e96c3c9d703fa048a8f (patch)
treecfa2b706104c5a05cd67ce88568296876b7d3a49 /src/main/java/org/onap/music/main/CachingUtil.java
parent7addd52dc73e6571028ca7f6a018e75ec1c9b0ca (diff)
Revert "music core implemented as a service"
This reverts commit 7addd52dc73e6571028ca7f6a018e75ec1c9b0ca. Change-Id: I0875ce10521363b8e17eb6cd2cf9d8848e572bea Issue-ID: MUSIC-189 Signed-off-by: Tschaen, Brendan <ctschaen@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/main/CachingUtil.java')
-rwxr-xr-xsrc/main/java/org/onap/music/main/CachingUtil.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/org/onap/music/main/CachingUtil.java b/src/main/java/org/onap/music/main/CachingUtil.java
index 5c253f5e..d3654118 100755
--- a/src/main/java/org/onap/music/main/CachingUtil.java
+++ b/src/main/java/org/onap/music/main/CachingUtil.java
@@ -41,8 +41,6 @@ import org.onap.music.eelf.logging.format.AppMessages;
import org.onap.music.eelf.logging.format.ErrorSeverity;
import org.onap.music.eelf.logging.format.ErrorTypes;
import org.onap.music.exceptions.MusicServiceException;
-import org.onap.music.service.MusicCoreService;
-import org.onap.music.service.impl.MusicCassaCore;
import com.att.eelf.configuration.EELFLogger;
import com.datastax.driver.core.DataType;
@@ -69,7 +67,6 @@ public class CachingUtil implements Runnable {
private static CacheAccess<String, Map<String, String>> musicValidateCache = JCS.getInstance("musicValidateCache");
private static Map<String, Number> userAttempts = new HashMap<>();
private static Map<String, Calendar> lastFailedTime = new HashMap<>();
- private static MusicCoreService musicCore = MusicCassaCore.getInstance();
public boolean isCacheRefreshNeeded() {
if (aafCache.get("initBlankMap") == null)
@@ -94,7 +91,7 @@ public class CachingUtil implements Runnable {
logger.error(EELFLoggerDelegate.errorLogger, e1.getMessage(),AppMessages.CACHEERROR, ErrorSeverity.CRITICAL, ErrorTypes.GENERALSERVICEERROR);
e1.printStackTrace();
}
- ResultSet rs = musicCore.get(pQuery);
+ ResultSet rs = MusicCore.get(pQuery);
Iterator<Row> it = rs.iterator();
Map<String, String> map = null;
while (it.hasNext()) {
@@ -248,7 +245,7 @@ public class CachingUtil implements Runnable {
+ namespace + "' allow filtering");
Row rs = null;
try {
- rs = musicCore.get(pQuery).one();
+ rs = MusicCore.get(pQuery).one();
} catch(InvalidQueryException e) {
logger.error(EELFLoggerDelegate.errorLogger,"Exception admin keyspace not configured."+e.getMessage());
throw new MusicServiceException("Please make sure admin.keyspace_master table is configured.");
@@ -272,7 +269,7 @@ public class CachingUtil implements Runnable {
pQuery.appendQueryString(
"SELECT uuid from admin.keyspace_master where keyspace_name = '"
+ keyspace + "' allow filtering");
- Row rs = musicCore.get(pQuery).one();
+ Row rs = MusicCore.get(pQuery).one();
try {
uuid = rs.getUUID("uuid").toString();
} catch (Exception e) {
@@ -289,7 +286,7 @@ public class CachingUtil implements Runnable {
pQuery.appendQueryString(
"SELECT application_name from admin.keyspace_master where keyspace_name = '"
+ keyspace + "' allow filtering");
- Row rs = musicCore.get(pQuery).one();
+ Row rs = MusicCore.get(pQuery).one();
try {
appName = rs.getString("application_name");
} catch (Exception e) {
@@ -338,7 +335,7 @@ public class CachingUtil implements Runnable {
}
Row rs = null;
try {
- rs = musicCore.get(queryObject).one();
+ rs = MusicCore.get(queryObject).one();
} catch (MusicServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -389,7 +386,7 @@ public class CachingUtil implements Runnable {
}
Row rs = null;
try {
- rs = musicCore.get(queryObject).one();
+ rs = MusicCore.get(queryObject).one();
} catch (MusicServiceException e) {
e.printStackTrace();
resultMap.put("Exception", "Unable to process operation. Error is "+e.getMessage());