Class SubjectSourceCache
java.lang.Object
edu.internet2.middleware.grouper.subj.cache.SubjectSourceCache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static void
cloneSubjects
(Map<String, Subject> subjects) static Subject
getSubjectByIdentifierFromCacheOrSource
(Source source, String identifier, boolean exceptionIfNotFound) get a subject by identifier or from cachestatic Subject
getSubjectByIdentifierFromCacheOrSource
(Source source, String identifier, boolean ignoreCachedSubjects, boolean exceptionIfNotFound) get a subject by identifier or from cachestatic Subject
getSubjectByIdOrIdentifierFromCacheOrSource
(Source source, String idOrIdentifier, boolean exceptionIfNotFound) get a subject by identifier or from cachestatic Subject
getSubjectByIdOrIdentifierFromCacheOrSource
(Source source, String idOrIdentifier, boolean ignoreCachedSubjects, boolean exceptionIfNotFound) get a subject by identifier or from cachestatic Subject
getSubjectFromCacheOrSource
(Source source, String id, boolean exceptionIfNotFound) get a subject by id or from cachestatic Subject
getSubjectFromCacheOrSource
(Source source, String id, boolean ignoreCachedSubjects, boolean exceptionIfNotFound) get a subject by id or from cachegetSubjectsByIdentifiersFromCacheOrSource
(Source source, Collection<String> identifiers) get a subject by id or from cachegetSubjectsByIdsFromCacheOrSource
(Source source, Collection<String> ids) get a subject by id or from cachegetSubjectsByIdsFromCacheOrSource
(Source source, Collection<String> ids, boolean ignoreCachedSubjects) get a subject by id or from cachegetSubjectsByIdsOrIdentifiersFromCacheOrSource
(Source source, Collection<String> idsOrIdentifiers) get a subject by id or from cachestatic int
max items in memorystatic SubjectSourceSerializer
retrieveCacheSerializer
(Map<String, Object> debugMap) static void
-
Constructor Details
-
SubjectSourceCache
public SubjectSourceCache()
-
-
Method Details
-
clearCache
public static void clearCache() -
subjectSourceCacheThread
public static void subjectSourceCacheThread() -
retrieveCacheSerializer
- Parameters:
debugMap
-- Returns:
- SubjectSourceSerializer
-
maxElementsInMemory
public static int maxElementsInMemory()max items in memory- Returns:
- max
-
getSubjectFromCacheOrSource
public static Subject getSubjectFromCacheOrSource(Source source, String id, boolean exceptionIfNotFound) get a subject by id or from cache- Parameters:
source
-id
-exceptionIfNotFound
-- Returns:
- subject
-
getSubjectFromCacheOrSource
public static Subject getSubjectFromCacheOrSource(Source source, String id, boolean ignoreCachedSubjects, boolean exceptionIfNotFound) get a subject by id or from cache- Parameters:
source
-id
-ignoreCachedSubjects
-exceptionIfNotFound
-- Returns:
- subject
-
getSubjectsByIdsFromCacheOrSource
public static Map<String,Subject> getSubjectsByIdsFromCacheOrSource(Source source, Collection<String> ids) get a subject by id or from cache- Parameters:
source
-ids
-- Returns:
- subject
-
getSubjectsByIdsFromCacheOrSource
public static Map<String,Subject> getSubjectsByIdsFromCacheOrSource(Source source, Collection<String> ids, boolean ignoreCachedSubjects) get a subject by id or from cache- Parameters:
source
-ids
-ignoreCachedSubjects
-- Returns:
- subject
-
getSubjectByIdentifierFromCacheOrSource
public static Subject getSubjectByIdentifierFromCacheOrSource(Source source, String identifier, boolean exceptionIfNotFound) get a subject by identifier or from cache- Parameters:
source
-identifier
-exceptionIfNotFound
-- Returns:
- subject
-
getSubjectByIdentifierFromCacheOrSource
public static Subject getSubjectByIdentifierFromCacheOrSource(Source source, String identifier, boolean ignoreCachedSubjects, boolean exceptionIfNotFound) get a subject by identifier or from cache- Parameters:
source
-identifier
-ignoreCachedSubjects
-exceptionIfNotFound
-- Returns:
- subject
-
cacheEnabled
public static boolean cacheEnabled()- Returns:
- if cache enabled
-
getSubjectByIdOrIdentifierFromCacheOrSource
public static Subject getSubjectByIdOrIdentifierFromCacheOrSource(Source source, String idOrIdentifier, boolean exceptionIfNotFound) get a subject by identifier or from cache- Parameters:
source
-idOrIdentifier
-exceptionIfNotFound
-- Returns:
- subject
-
getSubjectByIdOrIdentifierFromCacheOrSource
public static Subject getSubjectByIdOrIdentifierFromCacheOrSource(Source source, String idOrIdentifier, boolean ignoreCachedSubjects, boolean exceptionIfNotFound) get a subject by identifier or from cache- Parameters:
source
-idOrIdentifier
-ignoreCachedSubjects
-exceptionIfNotFound
-- Returns:
- subject
-
getSubjectsByIdentifiersFromCacheOrSource
public static Map<String,Subject> getSubjectsByIdentifiersFromCacheOrSource(Source source, Collection<String> identifiers) get a subject by id or from cache- Parameters:
source
-identifiers
-- Returns:
- subject
-
cloneSubjects
- Parameters:
subjects
-- Returns:
- the cloned subject
-
getSubjectsByIdsOrIdentifiersFromCacheOrSource
public static Map<String,Subject> getSubjectsByIdsOrIdentifiersFromCacheOrSource(Source source, Collection<String> idsOrIdentifiers) get a subject by id or from cache- Parameters:
source
-idsOrIdentifiers
-- Returns:
- subject
-