Esempio n. 1
0
        public int JobResultRemote(ComputeJobHolder job, PlatformMemoryStream stream)
        {
            // 1. Unmarshal result.
            PortableReaderImpl reader = _compute.Marshaller.StartUnmarshal(stream);

            Guid nodeId    = reader.ReadGuid().Value;
            bool cancelled = reader.ReadBoolean();

            try
            {
                object err;

                var data = PortableUtils.ReadWrappedInvocationResult(reader, out err);

                // 2. Process the result.
                return((int)JobResult0(new ComputeJobResultImpl(data, (Exception)err, job.Job, nodeId, cancelled)));
            }
            catch (Exception e)
            {
                Finish(default(TR), e);

                if (!(e is IgniteException))
                {
                    throw new IgniteException("Failed to process job result: " + e.Message, e);
                }

                throw;
            }
        }