示例#1
0
        public Task <HttpResponseMessage> SynchronizationTopology()
        {
            var synchronizationTopologyDiscoverer = new SynchronizationTopologyDiscoverer(FileSystem, new RavenJArray(), 10, Log);
            var node     = synchronizationTopologyDiscoverer.Discover();
            var topology = node.Flatten();

            return(GetMessageWithObjectAsTask(topology));
        }
示例#2
0
        public async Task <HttpResponseMessage> ReplicationTopologyDiscover()
        {
            var ttlAsString = GetQueryStringValue("ttl");

            int         ttl;
            RavenJArray from;

            if (string.IsNullOrEmpty(ttlAsString))
            {
                ttl  = 10;
                from = new RavenJArray();
            }
            else
            {
                ttl  = int.Parse(ttlAsString);
                from = await ReadJsonArrayAsync().ConfigureAwait(false);
            }

            var replicationSchemaDiscoverer = new SynchronizationTopologyDiscoverer(FileSystem, from, ttl, Log);
            var node = replicationSchemaDiscoverer.Discover();

            return(GetMessageWithObject(node));
        }