Ignore:
Timestamp:
Jun 18, 2010, 5:18:05 PM (11 years ago)
Author:
Paul Lelgemann
Message:

o Refactored distributed KeySearcher: updated directory structure and variable names

Location:
trunk/CrypPlugins/KeySearcher/P2P/Storage
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/P2P/Storage/StorageHelper.cs

    r1673 r1674  
    33using Cryptool.P2P;
    44using Cryptool.P2P.Internal;
     5using KeySearcher.P2P.Tree;
    56
    6 namespace KeySearcher.P2P.Nodes
     7namespace KeySearcher.P2P.Storage
    78{
    8     class P2PHelper
     9    class StorageHelper
    910    {
    10         private readonly KeySearcher _keySearcher;
     11        private readonly KeySearcher keySearcher;
    1112
    12         public P2PHelper(KeySearcher keySearcher)
     13        public StorageHelper(KeySearcher keySearcher)
    1314        {
    14             _keySearcher = keySearcher;
     15            this.keySearcher = keySearcher;
    1516        }
    1617
     
    6465            var requestResult = P2PManager.Retrieve(KeyInDht(nodeToUpdate));
    6566            var nodeBytes = requestResult.Data;
    66             nodeToUpdate.LastUpdateResult = requestResult.Status;
    6767
    6868            if (nodeBytes == null)
     
    9696            if (resultCount > 0)
    9797            {
    98                 _keySearcher.IntegrateNewResults(nodeToUpdate.Result);
     98                keySearcher.IntegrateNewResults(nodeToUpdate.Result);
    9999            }
    100100
     
    119119        internal static string KeyInDht(NodeBase node)
    120120        {
    121             return string.Format("p2pjob_{0}_node_{1}_{2}", node.DistributedJobIdentifier, node.From, node.To);
     121            return string.Format("{0}_node_{1}_{2}", node.DistributedJobIdentifier, node.From, node.To);
    122122        }
    123123    }
Note: See TracChangeset for help on using the changeset viewer.