private void updateAttributesCache ( String uniqueNameKey , String dn , Attributes newAttrs , String [ ] attrIds ) { final String METHODNAME = "updateAttributesCache(key,dn,newAttrs)" ; /* * Add uniqueName to DN mapping to cache */ getAttributesCache ( ) . put ( uniqueNameKey , dn , 1 , iAttrsCacheTimeOut , 0 , null ) ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHODNAME + " Update " + iAttrsCacheName + "(size: " + getAttributesCache ( ) . size ( ) + ")\n" + uniqueNameKey + ": " + dn ) ; } /* * Add the DN to Attributes mapping to the cache. */ String dnKey = toKey ( dn ) ; Object cached = getAttributesCache ( ) . get ( dnKey ) ; Attributes cachedAttrs = null ; if ( cached != null && cached instanceof Attributes ) { cachedAttrs = ( Attributes ) cached ; } updateAttributesCache ( dnKey , newAttrs , cachedAttrs , attrIds ) ; }
Update the attributes cache by adding a mapping of the unique name to distinguished name and mapping the distinguished name to the updated attributes .