protected void RefreshSupportedEnhancements() { lock (writeLock) { supportedEnhancements.Clear(); foreach (IBytecodeBehavior bytecodeBehavior in bytecodeBehaviorExtensions.GetExtensions()) { supportedEnhancements.AddAll(bytecodeBehavior.GetEnhancements()); } } }
public void AggregateAllCascadedObjRefs() { for (int a = childNodes.Count; a-- > 0;) { CacheDependencyNode childNode = childNodes[a]; childNode.AggregateAllCascadedObjRefs(); hardRefObjRefsToLoad.AddAll(childNode.hardRefObjRefsToLoad); objRefsToLoad.AddAll(childNode.objRefsToLoad); } }
static AbstractPropertyConfiguration() { //ignoreClassNames.Add(typeof(Thread)..class.getName()); ignoreClassNames.Add(typeof(AbstractPropertyConfiguration).FullName); ignoreClassNames.Add(typeof(BeanContextFactory).FullName); ignoreClassNames.Add(typeof(LinkController).FullName); ignoreClassNames.Add(typeof(PropertyEmbeddedRefConfiguration).FullName); ignoreClassNames.Add(typeof(PropertyRefConfiguration).FullName); ignoreClassNames.Add(typeof(PropertyValueConfiguration).FullName); ignoreClassNames.AddAll(AbstractBeanConfiguration.ignoreClassNames); }
public PrefetchPath CopyAppendableToCachePath(AppendableCachePath cachePath) { PrefetchPath[] clonedChildren = CopyAppendableToCachePath(cachePath.children); if (clonedChildren == null) { return(new PrefetchPath(cachePath.memberType, cachePath.memberIndex, cachePath.memberName, clonedChildren, new Type[0])); } CHashSet <Type> memberTypesOnDescendants = new CHashSet <Type>(); foreach (PrefetchPath clonedChild in clonedChildren) { memberTypesOnDescendants.Add(clonedChild.memberType); memberTypesOnDescendants.AddAll(clonedChild.memberTypesOnDescendants); } return(new PrefetchPath(cachePath.memberType, cachePath.memberIndex, cachePath.memberName, clonedChildren, memberTypesOnDescendants.ToArray())); }
protected void ChangeSecondLevelCacheIntern(CacheDependencyNode node, CacheDirective cacheDirective) { IRootCache rootCache = node.rootCache; HashMap <IObjRef, CacheValueAndPrivilege> objRefToLoadContainerDict = node.objRefToCacheValueMap; CHashSet <IObjRef> objRefsToLoad = new CHashSet <IObjRef>(node.objRefsToLoad); if (node.cacheChangeItems != null) { foreach (CacheChangeItem cci in node.cacheChangeItems) { if (cci == null) { continue; } objRefsToLoad.AddAll(cci.UpdatedObjRefs); } } IList <IObjRef> objRefs = objRefsToLoad.ToList(); IList <Object> refreshResult = rootCache.GetObjects(objRefs, cacheDirective); IPrivilege[] privileges = null; if (SecurityActivation != null && PrivilegeProvider != null && SecurityActivation.FilterActivated) { privileges = PrivilegeProvider.GetPrivilegesByObjRef(objRefs).GetPrivileges(); } for (int a = refreshResult.Count; a-- > 0;) { RootCacheValue cacheValue = (RootCacheValue)refreshResult[a]; if (cacheValue == null) { continue; } objRefToLoadContainerDict.Put(objRefs[a], new CacheValueAndPrivilege(cacheValue, privileges != null ? privileges[a] : null)); } CheckCascadeRefreshNeeded(node); CHashSet <IObjRef> cascadeRefreshObjRefsSet = node.cascadeRefreshObjRefsSet; CHashSet <IObjRelation> cascadeRefreshObjRelationsSet = node.cascadeRefreshObjRelationsSet; if (cascadeRefreshObjRelationsSet.Count > 0) { IList <IObjRelationResult> relationsResult = rootCache.GetObjRelations(cascadeRefreshObjRelationsSet.ToList(), cacheDirective); for (int a = relationsResult.Count; a-- > 0;) { IObjRelationResult relationResult = relationsResult[a]; cascadeRefreshObjRefsSet.AddAll(relationResult.Relations); } // apply gathered information of unknown relations to the rootCache rootCache.Put(relationsResult); } if (cascadeRefreshObjRefsSet.Count > 0) { IList <IObjRef> cascadeRefreshObjRefsSetList = cascadeRefreshObjRefsSet.ToList(); refreshResult = rootCache.GetObjects(cascadeRefreshObjRefsSetList, cacheDirective); } List <CacheDependencyNode> childNodes = node.childNodes; for (int a = childNodes.Count; a-- > 0;) { ChangeSecondLevelCacheIntern(childNodes[a], failInCacheHierarchyAndCacheValueResultAndReturnMissesSet); } }