Пример #1
0
        public void Store(string name, PyDataType data, long timestamp)
        {
            PyCacheHint hint = PyCacheHint.FromPyObject(name, data, timestamp, this.mContainer.NodeID);

            // save cache hint
            this.mCacheHints[name] = hint;
            // save cache object
            this.mCacheData[name] = PyCachedObject.FromCacheHint(hint, data);
        }
Пример #2
0
        public void Store(string name, PyDataType data, long timestamp)
        {
            byte[] marshalData = Marshal.ToByteArray(data);

            PyCacheHint hint = PyCacheHint.FromPyObject(name, marshalData, timestamp, this.mContainer.NodeID);

            // save cache hint
            this.mCacheHints[name] = hint;
            // save cache object
            this.mCacheData[name] = PyCachedObject.FromCacheHint(hint, marshalData);
        }
Пример #3
0
        public void StoreCall(string service, string method, PyDataType data, long timestamp)
        {
            byte[] marshalData = Marshal.ToByteArray(data);

            string      index    = $"{service}::{method}";
            PyDataType  objectID = this.GenerateObjectIDForCall(service, method);
            PyCacheHint hint     = PyCacheHint.FromPyObject(objectID, marshalData, timestamp, this.mContainer.NodeID);

            // save cache hint
            this.mCacheHints[index] = hint;
            // save cache object
            this.mCacheData[index] = PyCachedObject.FromCacheHint(hint, marshalData);
        }