コード例 #1
0
        public override void ResetItemTimeout(HttpContext context, string id)
        {
            var result = _client.Get(ApplicationName, id);
            var riakSessionItem = new RiakSessionItem(result.Value) {Timeout = _config.Timeout.Minutes};
            riakSessionItem.ResetTimeout();

            _client.Async.Put(riakSessionItem.ToRiakObject(), results => { return; });
        }
コード例 #2
0
        public override void ReleaseItemExclusive(HttpContext context, string id, object lockId)
        {
            var riakObject = _client.Get(ApplicationName, id).Value;
            var riakSessionItem = new RiakSessionItem(riakObject) {Timeout = _config.Timeout.Minutes};

            if (riakSessionItem.LockId == (int)lockId)
            {
                riakSessionItem.ResetTimeout();
                _client.Async.Put(riakSessionItem.ToRiakObject(), result => { return; });
            }
        }