summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/src
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-cass/src')
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/CachedCredDAO.java2
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/FileGetter.java12
2 files changed, 9 insertions, 5 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/CachedCredDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/CachedCredDAO.java
index 9c55d464..b1165c26 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/CachedCredDAO.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/CachedCredDAO.java
@@ -38,7 +38,7 @@ public class CachedCredDAO extends CachedDAO<AuthzTrans, CredDAO, CredDAO.Data>
public CachedCredDAO(CredDAO dao, CIDAO<AuthzTrans> info, long expiresIn) {
super(dao, info, CredDAO.CACHE_SEG, expiresIn);
- if(FileGetter.isLoaded) {
+ if(FileGetter.isLoaded()) {
readID = new ReadID() {
@Override
public Result<List<Data>> read(AuthzTrans trans, final String id) {
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/FileGetter.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/FileGetter.java
index 702f989a..75efdfae 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/FileGetter.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cached/FileGetter.java
@@ -43,9 +43,9 @@ import org.onap.aaf.cadi.util.CSV;
public class FileGetter {
private static final String AAF_FILEGETTER = "aaf_filegetter";
- public static boolean isLoaded = false;
+ private static boolean isLoaded = false;
private static FileGetter singleton;
-
+ private static List<CredDAO.Data> EMPTY = new ArrayList<>();
private Map<String,List<CredDAO.Data>> data;
private SimpleDateFormat sdf;
private FileGetter(Access access) {
@@ -110,12 +110,12 @@ public class FileGetter {
singleton = new FileGetter(access);
}
return singleton;
-
}
+
public Getter<CredDAO.Data> getter(String id) {
return new FGetter(id);
}
- private static List<CredDAO.Data> EMPTY = new ArrayList<>();
+
public class FGetter implements Getter<CredDAO.Data> {
private final List<CredDAO.Data> lcdd;
public FGetter(final String id) {
@@ -142,5 +142,9 @@ public class FileGetter {
}
}
}
+
+ public static boolean isLoaded() {
+ return isLoaded;
+ }
}