edu.internet2.middleware.ldappc.util
Class SubjectCache

java.lang.Object
  extended by edu.internet2.middleware.ldappc.util.SubjectCache

public class SubjectCache
extends Object

Cache subjects retrieved from subject sources to help with performance issues.


Constructor Summary
SubjectCache(Ldappc ldappc)
           
 
Method Summary
 Set<Name> findSubjectDn(Member member)
          Returns the member's DN.
 String getSubjectData(Subject subject)
          Returns subject data string without attributes.
 String getSubjectData(Subject subject, boolean attributes)
          Returns subject data string.
 int getSubjectIdLookups()
          Return the count of subject ID lookups.
 int getSubjectIdTableHits()
          Return the count of subject ID table hits.
 void init()
          Initialize, or clear, the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubjectCache

public SubjectCache(Ldappc ldappc)
Method Detail

getSubjectIdLookups

public int getSubjectIdLookups()
Return the count of subject ID lookups.

Returns:
the subjectIDLookups

getSubjectIdTableHits

public int getSubjectIdTableHits()
Return the count of subject ID table hits.

Returns:
the subjectIDTableHits

getSubjectData

public String getSubjectData(Subject subject)
Returns subject data string without attributes.

Parameters:
subject - Subject
Returns:
subject data string

getSubjectData

public String getSubjectData(Subject subject,
                             boolean attributes)
Returns subject data string.

Parameters:
subject - Subject
attributes - include attribute values
Returns:
subject data string

findSubjectDn

public Set<Name> findSubjectDn(Member member)
                        throws NamingException,
                               LdappcException
Returns the member's DN.

Parameters:
member - the member
Returns:
the member's DN
Throws:
NamingException - if an ldap error occurs
LdappcException - if there is a configuration error or if exactly one DN cannot be determined

init

public void init()
Initialize, or clear, the cache. Initialize the hash tables mapping between RDN and subject ID. Use the estimate in the config file if present.



Copyright © 2012 Internet2. All Rights Reserved.