public override void SetAndReleaseItemExclusive(HttpContext context, string id, SessionStateStoreData item, object lockId, bool newItem)
        {
            LogUtils.WriteInfo("------------------ SetAndReleaseItemExclusive 1 ------------------");

            ISessionStateItemCollection sessionItems  = null;
            HttpStaticObjectsCollection staticObjects = null;

            if (item.Items.Count > 0)
            {
                sessionItems = item.Items;
            }

            if (!item.StaticObjects.NeverAccessed)
            {
                staticObjects = item.StaticObjects;
            }

            LogUtils.WriteInfo(context);
            LogUtils.WriteInfo(id);
            LogUtils.WriteInfo(item);
            LogUtils.WriteInfo(lockId);
            LogUtils.WriteInfo(newItem);
            LogUtils.WriteInfo(staticObjects);
            LogUtils.WriteInfo(sessionItems);


            MqdSessionState state2 = new MqdSessionState(sessionItems, staticObjects, item.Timeout);

            LogUtils.WriteInfo(state2);

            RedisUtils.SetString(id, state2.ToJson(), item.Timeout);

            LogUtils.WriteInfo("------------------ SetAndReleaseItemExclusive 2 ------------------\r\n");
        }
        public override void CreateUninitializedItem(HttpContext context, string id, int timeout)
        {
            LogUtils.WriteInfo("------------------ CreateUninitializedItem 1 ------------------");
            LogUtils.WriteInfo(context);
            LogUtils.WriteInfo(id);
            LogUtils.WriteInfo(timeout);

            MqdSessionState state = new MqdSessionState(null, null, timeout);

            LogUtils.WriteInfo(state);

            RedisUtils.SetString(id, state.ToJson(), timeout);

            LogUtils.WriteInfo("------------------ CreateUninitializedItem 2 ------------------\r\n");
        }
        private SessionStateStoreData DoGet(HttpContext context, string id, bool exclusive, out bool locked, out TimeSpan lockAge, out object lockId, out SessionStateActions actionFlags)
        {
            locked      = false;
            lockId      = null;
            lockAge     = TimeSpan.Zero;
            actionFlags = SessionStateActions.None;

            string          data  = RedisUtils.GetString(id);
            MqdSessionState state = MqdSessionState.FromJson(data);

            if (state == null)
            {
                return(null);
            }

            RedisUtils.SetExpire(id, state._timeout);
            return(CreateSessionStoreData(context, state._sessionItems, state._staticObjects, state._timeout));
        }