/// <summary>
        /// Reads cache entry processor and related data from stream, executes it and returns the result.
        /// </summary>
        /// <param name="inOutStream">Stream.</param>
        /// <param name="grid">Grid.</param>
        /// <returns>CacheEntryProcessor result.</returns>
        private CacheEntryProcessorResultHolder ReadAndRunCacheEntryProcessor(IPortableStream inOutStream,
                                                                              Ignite grid)
        {
            var marsh = grid.Marshaller;

            var key     = marsh.Unmarshal <object>(inOutStream);
            var val     = marsh.Unmarshal <object>(inOutStream);
            var isLocal = inOutStream.ReadBool();

            var holder = isLocal
                ? _handleRegistry.Get <CacheEntryProcessorHolder>(inOutStream.ReadLong(), true)
                : marsh.Unmarshal <CacheEntryProcessorHolder>(inOutStream);

            return(holder.Process(key, val, val != null, grid));
        }