// Updates the parent properties- size or acl or both. If all required properties have been updated for the parent then recursively move up the tree and keep doing the same
 private void UpdateParentProperty(PropertyTreeNode currentNode, bool firstTurn)
 {
     if (currentNode.CheckAndUpdateParentProperties(_manager.GetAclProperty, _manager.GetSizeProperty, firstTurn))
     {
         if (PropertyManager.PropertyJobLog.IsDebugEnabled)
         {
             var pn = currentNode.ParentNode;
             PropertyManager.PropertyJobLog.Debug(
                 $"{JobType()}.UpdateParentPorperty, JobEntryName: {_currentNode.FullPath}, ParentNode: {pn.FullPath}, AllChildPropertiesUpdated{(_manager.GetSizeProperty ? $", TotFiles: {pn.TotChildFiles}, TotDirecs: {pn.TotChildDirec}, Totsizes: {pn.TotChildSize}" : string.Empty)}{(_manager.GetAclProperty ? $", IsAclSameForAllChilds: {pn.AllChildSameAcl}" : string.Empty)}");
         }
         // Everything below currentNode.ParentNode is done- now put job for dumping
         EnqueueWritingJobForAllChilds(currentNode.ParentNode);
         if (currentNode.ParentNode.DepthLevel == 0)
         {
             _manager.ConsumerQueue.Add(new PoisonJob());
         }
         else
         {
             UpdateParentProperty(currentNode.ParentNode, false);
         }
     }
     else
     {
         if (PropertyManager.PropertyJobLog.IsDebugEnabled)
         {
             var pn = currentNode.ParentNode;
             PropertyManager.PropertyJobLog.Debug(
                 $"{JobType()}.UpdateParentPorperty, JobEntryNode: {_currentNode.FullPath}, ParentNode: {pn.FullPath}{(_manager.GetSizeProperty ? $", TotChildSizeDone: {pn.GetNumChildDirectoryProcessed()}/{pn.ChildDirectoryNodes.Count}, TotFiles: {pn.TotChildFiles}, TotDirecs: {pn.TotChildDirec}, Totsizes: {pn.TotChildSize}" : string.Empty)}{(_manager.GetAclProperty ? $", TotChildSizeDone: {pn.GetNumChildsAclProcessed()}/{pn.ChildDirectoryNodes.Count + pn.ChildFileNodes.Count}, IsAclSameForAllChilds: {pn.AllChildSameAcl}" : string.Empty)}");
         }
     }
 }
コード例 #2
0
 // Updates the parent properties- size or acl or both. If all required properties have been updated for the parent then recursively move up the tree and keep doing the same
 private void UpdateParentProperty(PropertyTreeNode currentNode, bool firstTurn)
 {
     if (currentNode.CheckAndUpdateParentProperties(_manager.GetAclProperty, _manager.GetSizeProperty, firstTurn))
     {
         // Everything below currentNode.ParentNode is done- now put job for dumping
         EnqueueWritingJobForAllChilds(currentNode.ParentNode);
         if (currentNode.ParentNode.DepthLevel == 0)
         {
             _manager.ConsumerQueue.Add(new PoisonJob());
         }
         else
         {
             UpdateParentProperty(currentNode.ParentNode, false);
         }
     }
 }