eu.emi.security.authn.x509.helpers.ns
Class LazyGlobusNamespacesStore

java.lang.Object
  extended by eu.emi.security.authn.x509.helpers.ns.AbstractNamespacesStore
      extended by eu.emi.security.authn.x509.helpers.ns.AbstractGlobusNamespacesStore
          extended by eu.emi.security.authn.x509.helpers.ns.LazyGlobusNamespacesStore
All Implemented Interfaces:
NamespacesStore

public class LazyGlobusNamespacesStore
extends AbstractGlobusNamespacesStore

Globus EACL policies are loaded on demand by this store and are cached in memory. A weak hash map is used to cache data. Additionally the data is cached for no longer then the update interval, which in practice is the same as for the cooperating truststore.

This class it thread safe.

Author:
K. Benedyczak

Field Summary
protected  String directory
           
protected  Map<String,CachedElement<Map<String,List<NamespacePolicy>>>> policiesByName
          This structure holds the namespaces cache.
protected  long updateInterval
           
 
Fields inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractGlobusNamespacesStore
SUFFIX
 
Fields inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractNamespacesStore
observers, openssl1Mode
 
Constructor Summary
LazyGlobusNamespacesStore(ObserversHandler observers, boolean openssl1Mode, String directory, long updateInterval)
           
 
Method Summary
protected  List<NamespacePolicy> getPoliciesFor(String definedForHash, String issuerDn)
           
 void setPolicies(Collection<String> locations)
           
 
Methods inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractGlobusNamespacesStore
getFileSuffix, getNotificationType, getParser, getPolicies
 
Methods inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractNamespacesStore
addPolicy, addPolicyToMap, getCachedPolicies, getPolicies, tryLoadNsLocation, tryLoadNsPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

policiesByName

protected Map<String,CachedElement<Map<String,List<NamespacePolicy>>>> policiesByName
This structure holds the namespaces cache. The primary map key is the hash name of the file from which some of the policies were loaded. At the same time it is a hash of the subject name of the CA for which the namespaces were directly defined. The internal map is indexed with issuer names, i.e. the names of the CA subjects for which we have policies. The value is a list with all the policies for the CA, in order of appearance in the policy file.


directory

protected final String directory

updateInterval

protected final long updateInterval
Constructor Detail

LazyGlobusNamespacesStore

public LazyGlobusNamespacesStore(ObserversHandler observers,
                                 boolean openssl1Mode,
                                 String directory,
                                 long updateInterval)
Method Detail

setPolicies

public void setPolicies(Collection<String> locations)

getPoliciesFor

protected List<NamespacePolicy> getPoliciesFor(String definedForHash,
                                               String issuerDn)
Specified by:
getPoliciesFor in class AbstractGlobusNamespacesStore


Copyright © 2012-2014 European Middleware Initiative. All Rights Reserved.