diff options
Diffstat (limited to 'src/main/java/org/onap/music/main/CachingUtil.java')
-rwxr-xr-x | src/main/java/org/onap/music/main/CachingUtil.java | 15 |
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()); |