source: trunk/CrypPlugins/PeerToPeerJobs/IJobResult.cs @ 1137

Last change on this file since 1137 was 1137, checked in by arnold, 12 years ago

Completely redesigned Manager-JobAdmin-Worker-infrastructure to distribute Jobs with a Peer-to-Peer infrastructure to remote CT2-Workspaces.

To test this infrastructure, open 2 instances of CT and load P2P_Manager_NEW_DES.cte and in the other instance P2P_Worker_NEW.cte.
HINT: Working with remote peers isn't possible every time, because the so called "SuperNode", which is necessary for relaying, sometimes goes down. But testing this infrastructure on different computers in the same network should work every time.

File size: 1.8 KB
Line 
1/* Copyright 2010 Team CrypTool (Christian Arnold), Uni Duisburg-Essen
2
3   Licensed under the Apache License, Version 2.0 (the "License");
4   you may not use this file except in compliance with the License.
5   You may obtain a copy of the License at
6
7       http://www.apache.org/licenses/LICENSE-2.0
8
9   Unless required by applicable law or agreed to in writing, software
10   distributed under the License is distributed on an "AS IS" BASIS,
11   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   See the License for the specific language governing permissions and
13   limitations under the License.
14*/
15
16using System;
17using System.Collections.Generic;
18using System.Linq;
19using System.Text;
20using Cryptool.PluginBase.Miscellaneous;
21
22namespace Cryptool.Plugins.PeerToPeer.Jobs
23{
24    public interface IJobResult<JobResultType>
25    {
26        /// <summary>
27        /// in this context a unique identifier for the job, whose
28        /// Result is represented by this class
29        /// </summary>
30        BigInteger JobId { get; set; }
31        /// <summary>
32        /// You can allow intermediate results by using this flag
33        /// </summary>
34        bool IsIntermediateResult { get; set; }
35        /// <summary>
36        /// Timespan between start and end processing
37        /// </summary>
38        TimeSpan ProcessingTime { get; set; }
39        JobResultType Result { get; set; }
40        /// <summary>
41        /// serializes this class, so you can recover all class information by deserializing.
42        /// HINT: You can Deserialize a byte[] representation of this class by using the constructor with
43        /// the byte[] parameter!
44        /// </summary>
45        /// <returns>serialized byte[] representation of this class</returns>
46        byte[] Serialize();
47    }
48}
Note: See TracBrowser for help on using the repository browser.