Changeset 2074


Ignore:
Timestamp:
Nov 10, 2010, 1:56:10 PM (11 years ago)
Author:
nolte
Message:

Added the Branch Changes to the Trunk...Each Job will see a unique machine ID as the momentary "Jobsubmitter". This will be changed to the Avatar Name of the Job Submitter later on. These changes are tested.

Location:
trunk/CrypPlugins/KeySearcher/P2P
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/P2P/DistributedBruteForceManager.cs

    r2040 r2074  
    7777
    7878            status.StartDate = keyPoolTree.StartDate();
     79            //----------------------------------------------
     80            status.JobSubmitterID = keyPoolTree.SubmitterID();
     81            //-----------------------------------------------
     82
    7983            keyPoolTree.UpdateStatusForNewCalculation();
    8084
  • trunk/CrypPlugins/KeySearcher/P2P/Presentation/StatusContainer.cs

    r1727 r2074  
    9696        }
    9797
     98        //----------------------------------
     99        private long jobSubmitterID;
     100        public long JobSubmitterID
     101        {
     102            get { return jobSubmitterID; }
     103            set
     104            {
     105                jobSubmitterID = value;
     106                OnPropertyChanged("JobSubmitterID");
     107            }
     108        }
     109        //-----------------------------------
     110
    98111        private TimeSpan elapsedTime;
    99112        public TimeSpan ElapsedTime
  • trunk/CrypPlugins/KeySearcher/P2P/Storage/StorageHelper.cs

    r2019 r2074  
    169169        }
    170170
     171        //------------------------------------------------------------------------
     172        public long SubmitterID(String ofJobIdentifier)
     173        {
     174            var key = ofJobIdentifier + "_submitterid";
     175            var requestResult = RetrieveWithStatistic(key);
     176
     177            if (requestResult.IsSuccessful() && requestResult.Data != null)
     178            {
     179                var submitterid = BitConverter.ToInt64(requestResult.Data, 0);
     180                return submitterid;
     181            }
     182
     183            StoreWithStatistic(key, BitConverter.GetBytes(Cryptool.PluginBase.Miscellaneous.UniqueIdentifier.GetID()));
     184            return Cryptool.PluginBase.Miscellaneous.UniqueIdentifier.GetID();
     185        }
     186        //---------------------------------------------------------------------------
     187
    171188        public RequestResult RetrieveWithStatistic(string key)
    172189        {
  • trunk/CrypPlugins/KeySearcher/P2P/Tree/KeyPoolTree.cs

    r2039 r2074  
    5353            return storageHelper.StartDate(Identifier);
    5454        }
     55
     56        //---------------------------------------------------
     57        public long SubmitterID()
     58        {
     59            return storageHelper.SubmitterID(Identifier);
     60        }
     61        //----------------------------------------------------
    5562
    5663        public Leaf FindNextLeaf()
Note: See TracChangeset for help on using the changeset viewer.