public Task CheckForTopologyChanges(RequestHandlerContext context)
        {
            var topologyEtag = GetLongFromHeaders(Constants.Headers.TopologyEtag);

            if (topologyEtag.HasValue && Server.ServerStore.HasTopologyChanged(topologyEtag.Value))
            {
                context.HttpContext.Response.Headers[Constants.Headers.RefreshTopology] = "true";
            }

            return(Task.CompletedTask);
        }
Example #2
0
        public override void Init(RequestHandlerContext context)
        {
            base.Init(context);

            var topologyEtag = GetLongFromHeaders(Constants.Headers.TopologyEtag);

            if (topologyEtag.HasValue && Server.ServerStore.HasTopologyChanged(topologyEtag.Value))
            {
                context.HttpContext.Response.Headers[Constants.Headers.RefreshTopology] = "true";
            }
        }
Example #3
0
 public virtual void Init(RequestHandlerContext context)
 {
     _context = context;
 }
        public override void Init(RequestHandlerContext context)
        {
            base.Init(context);

            context.HttpContext.Response.OnStarting(() => CheckForTopologyChanges(context));
        }