Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComputeFuncJob"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ComputeFuncJob(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _clo = PortableUtils.ReadPortableOrSerializable <IComputeFunc>(reader0);
            _arg = PortableUtils.ReadPortableOrSerializable <object>(reader0);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComputeFuncWrapper"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ComputeFuncWrapper(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _func = PortableUtils.ReadPortableOrSerializable <object>(reader0);

            _invoker = DelegateTypeDescriptor.GetComputeFunc(_func.GetType());
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComputeJobWrapper"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ComputeJobWrapper(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _job = PortableUtils.ReadPortableOrSerializable <object>(reader0);

            DelegateTypeDescriptor.GetComputeJob(_job.GetType(), out _execute, out _cancel);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ContinuousQueryFilterHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ContinuousQueryFilterHolder(IPortableReader reader)
        {
            PortableReaderImpl rawReader = (PortableReaderImpl)reader.RawReader();

            _keyTyp       = PortableUtils.ReadPortableOrSerializable <Type>(rawReader);
            _valTyp       = PortableUtils.ReadPortableOrSerializable <Type>(rawReader);
            _filter       = PortableUtils.ReadPortableOrSerializable <object>(rawReader);
            _keepPortable = rawReader.ReadBoolean();
        }
Esempio n. 5
0
        /// <summary>
        /// Default ctor for marshalling.
        /// </summary>
        /// <param name="reader"></param>
        public ComputeJobHolder(IPortableReader reader)
        {
            Debug.Assert(reader != null);

            var reader0 = (PortableReaderImpl)reader.RawReader();

            _ignite = reader0.Marshaller.Ignite;

            _job = PortableUtils.ReadPortableOrSerializable <IComputeJob>(reader0);
        }
Esempio n. 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MessageFilterHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public MessageFilterHolder(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _filter = PortableUtils.ReadPortableOrSerializable <object>(reader0);

            _invoker = GetInvoker(_filter);

            _ignite = reader0.Marshaller.Ignite;

            ResourceProcessor.Inject(_filter, _ignite);
        }
Esempio n. 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheEntryProcessorHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public CacheEntryProcessorHolder(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _proc = PortableUtils.ReadPortableOrSerializable <object>(reader0);
            _arg  = PortableUtils.ReadPortableOrSerializable <object>(reader0);

            _processFunc = GetProcessFunc(_proc);

            var kvTypes = DelegateTypeDescriptor.GetCacheEntryProcessorTypes(_proc.GetType());

            _entryCtor = MutableCacheEntry.GetCtor(kvTypes.Item1, kvTypes.Item2);
        }
Esempio n. 8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheEntryFilterHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public CacheEntryFilterHolder(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _pred = PortableUtils.ReadPortableOrSerializable <object>(reader0);

            _keepPortable = reader0.ReadBoolean();

            _marsh = reader0.Marshaller;

            _invoker = GetInvoker(_pred);

            _handle = _marsh.Ignite.HandleRegistry.Allocate(this);
        }
Esempio n. 9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StreamReceiverHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public StreamReceiverHolder(PortableReaderImpl reader)
        {
            var rcvType = reader.ReadByte();

            _rcv = PortableUtils.ReadPortableOrSerializable <object>(reader);

            Debug.Assert(_rcv != null);

            var type = _rcv.GetType();

            if (rcvType == RcvTransformer)
            {
                // rcv is a user ICacheEntryProcessor<K, V, A, R>, construct StreamTransformer from it.
                // (we can't marshal StreamTransformer directly, because it is generic,
                // and we do not know type arguments that user will have)
                _rcv = DelegateTypeDescriptor.GetStreamTransformerCtor(type)(_rcv);
            }

            _invoke = DelegateTypeDescriptor.GetStreamReceiver(_rcv.GetType());
        }
Esempio n. 10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PortableResultWrapper"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public PortableResultWrapper(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _result = PortableUtils.ReadPortableOrSerializable <object>(reader0);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PortableOrSerializableObjectHolder"/> class.
 /// </summary>
 /// <param name="reader">The reader.</param>
 public PortableOrSerializableObjectHolder(IPortableReader reader)
 {
     _item = PortableUtils.ReadPortableOrSerializable <object>((PortableReaderImpl)reader.RawReader());
 }
Esempio n. 12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComputeActionJob"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ComputeActionJob(IPortableReader reader)
        {
            var reader0 = (PortableReaderImpl)reader.RawReader();

            _action = PortableUtils.ReadPortableOrSerializable <IComputeAction>(reader0);
        }