/** * @see PrincipalProvider#close() */ @Override public synchronized void close() { super.close(); }
/** * Sets the {@link #NEGATIVE_ENTRY_KEY} option value to <code>true</code> if * it isn't included yet in the passed options, before calling the init * method of the base class. * * @param options */ @Override public void init(Properties options) { if (!options.containsKey(NEGATIVE_ENTRY_KEY)) { options.put(NEGATIVE_ENTRY_KEY, "true"); } super.init(options); }
/** * {@inheritDoc} * * {@link #providePrincipal(String)} is called, if no matching entry * is present in the cache.<br> * NOTE: If the cache is enabled to contain negative entries (see * {@link #NEGATIVE_ENTRY_KEY} configuration option), the cache will also * store negative matches (as <code>null</code> values) in the principal cache. */ public synchronized Principal getPrincipal(String principalName) { checkInitialized(); if (cache.containsKey(principalName)) { return (Principal) cache.get(principalName); } else { Principal principal = providePrincipal(principalName); if (principal != null || includeNegative) { cache.put(principalName, principal); } return principal; } }
/** * Clears the cache and calls the implementation to close their resources * @see PrincipalProvider#close() */ public synchronized void close() { checkInitialized(); cache.clear(); initialized = false; } }
/** * {@inheritDoc} * * {@link #providePrincipal(String)} is called, if no matching entry * is present in the cache.<br> * NOTE: If the cache is enabled to contain negative entries (see * {@link #NEGATIVE_ENTRY_KEY} configuration option), the cache will also * store negative matches (as <code>null</code> values) in the principal cache. */ public synchronized Principal getPrincipal(String principalName) { checkInitialized(); if (cache.containsKey(principalName)) { return (Principal) cache.get(principalName); } else { Principal principal = providePrincipal(principalName); if (principal != null || includeNegative) { cache.put(principalName, principal); } return principal; } }
/** * Clears the cache and calls the implementation to close their resources * @see PrincipalProvider#close() */ public synchronized void close() { checkInitialized(); cache.clear(); initialized = false; } }
/** * @see PrincipalProvider#close() */ @Override public synchronized void close() { super.close(); }
/** * Sets the {@link #NEGATIVE_ENTRY_KEY} option value to <code>true</code> if * it isn't included yet in the passed options, before calling the init * method of the base class. * * @param options */ @Override public void init(Properties options) { if (!options.containsKey(NEGATIVE_ENTRY_KEY)) { options.put(NEGATIVE_ENTRY_KEY, "true"); } super.init(options); }