Class SubjectSourceCache

java.lang.Object
edu.internet2.middleware.grouper.subj.cache.SubjectSourceCache

public class SubjectSourceCache extends Object
  • Constructor Details

    • SubjectSourceCache

      public SubjectSourceCache()
  • Method Details

    • clearCache

      public static void clearCache()
    • subjectSourceCacheThread

      public static void subjectSourceCacheThread()
    • retrieveCacheSerializer

      public static SubjectSourceSerializer retrieveCacheSerializer(Map<String,Object> debugMap)
      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

      public static Map<String,Subject> cloneSubjects(Map<String,Subject> subjects)
      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