public class SubjectSourceCache extends Object
| Constructor and Description |
|---|
SubjectSourceCache() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
cacheEnabled() |
static void |
clearCache() |
static Subject |
cloneSubject(Subject subject) |
static Map<String,Subject> |
cloneSubjects(Map<String,Subject> subjects) |
static Subject |
getSubjectByIdentifierFromCacheOrSource(Source source,
String identifier,
boolean exceptionIfNotFound)
get a subject by identifier or from cache
|
static Subject |
getSubjectByIdOrIdentifierFromCacheOrSource(Source source,
String idOrIdentifier,
boolean exceptionIfNotFound)
get a subject by identifier or from cache
|
static Subject |
getSubjectFromCacheOrSource(Source source,
String id,
boolean exceptionIfNotFound)
get a subject by id or from cache
|
static Map<String,Subject> |
getSubjectsByIdentifiersFromCacheOrSource(Source source,
Collection<String> identifiers)
get a subject by id or from cache
|
static Map<String,Subject> |
getSubjectsByIdsFromCacheOrSource(Source source,
Collection<String> ids)
get a subject by id or from cache
|
static Map<String,Subject> |
getSubjectsByIdsOrIdentifiersFromCacheOrSource(Source source,
Collection<String> idsOrIdentifiers)
get a subject by id or from cache
|
static int |
maxElementsInMemory()
max items in memory
|
static SubjectSourceSerializer |
retrieveCacheSerializer(Map<String,Object> debugMap) |
static void |
subjectSourceCacheThread() |
public static void clearCache()
public static void subjectSourceCacheThread()
public static SubjectSourceSerializer retrieveCacheSerializer(Map<String,Object> debugMap)
debugMap - public static int maxElementsInMemory()
public static Subject getSubjectFromCacheOrSource(Source source, String id, boolean exceptionIfNotFound)
source - id - exceptionIfNotFound - public static Map<String,Subject> getSubjectsByIdsFromCacheOrSource(Source source, Collection<String> ids)
source - ids - public static Subject getSubjectByIdentifierFromCacheOrSource(Source source, String identifier, boolean exceptionIfNotFound)
source - identifier - exceptionIfNotFound - public static boolean cacheEnabled()
public static Subject getSubjectByIdOrIdentifierFromCacheOrSource(Source source, String idOrIdentifier, boolean exceptionIfNotFound)
source - idOrIdentifier - exceptionIfNotFound - public static Map<String,Subject> getSubjectsByIdentifiersFromCacheOrSource(Source source, Collection<String> identifiers)
source - identifiers - public static Subject cloneSubject(Subject subject)
subject - public static Map<String,Subject> cloneSubjects(Map<String,Subject> subjects)
subjects - Copyright © 2016 Internet2. All rights reserved.