public ConnectionState(IEventsTransport eventsTransport) { this.eventsTransport = eventsTransport; DocumentStore = new DocumentsConnectionState(Enqueue); FileSystem = new FileSystemConnectionState(Enqueue); CounterStorage = new CounterStorageConnectionState(Enqueue); TimeSeries = new TimeSeriesConnectionState(Enqueue); }
public ConnectionState Register(IEventsTransport transport) { timeSensitiveStore.Seen(transport.Id); transport.Disconnected += () => TimeSensitiveStore.Missing(transport.Id); return(connections.AddOrUpdate(transport.Id, new ConnectionState(transport), (s, state) => { state.Reconnect(transport); return state; })); }
public ConnectionState Register(IEventsTransport transport) { timeSensitiveStore.Seen(transport.Id); transport.Disconnected += () => TimeSensitiveStore.Missing(transport.Id); return connections.AddOrUpdate(transport.Id, new ConnectionState(transport), (s, state) => { state.Reconnect(transport); return state; }); }
public ConnectionState For(string id, RavenDbApiController controller = null) { return(connections.GetOrAdd(id, _ => { IEventsTransport eventsTransport = null; if (controller != null) { eventsTransport = new ChangesPushContent(controller); } var connectionState = new ConnectionState(eventsTransport); TimeSensitiveStore.Missing(id); return connectionState; })); }
public void RegisterResourceHttpTraceTransport(IEventsTransport transport, string resourceName) { var curResourceEventTransports = resourceHttpTraces.GetOrAdd(resourceName); curResourceEventTransports.Add(transport); transport.Disconnected += () => { ConcurrentSet <IEventsTransport> resourceEventTransports; resourceHttpTraces.TryGetValue(resourceName, out resourceEventTransports); if (resourceEventTransports != null) { resourceEventTransports.TryRemove(transport); } }; }
public AdminLogsConnectionState Register(IEventsTransport transport) { timeSensitiveStore.Seen(transport.Id); transport.Disconnected += () => { timeSensitiveStore.Missing(transport.Id); AdminLogsConnectionState _; connections.TryRemove(transport.Id, out _); AlterEnabled(); }; return(connections.AddOrUpdate( transport.Id, new AdminLogsConnectionState(transport), (s, state) => { state.Reconnect(transport); return state; })); }
public AdminLogsConnectionState Register(IEventsTransport transport) { timeSensitiveStore.Seen(transport.Id); transport.Disconnected += () => { timeSensitiveStore.Missing(transport.Id); AdminLogsConnectionState _; connections.TryRemove(transport.Id, out _); AlterEnabled(); }; return connections.AddOrUpdate( transport.Id, new AdminLogsConnectionState(transport), (s, state) => { state.Reconnect(transport); return state; }); }
public AdminLogsConnectionState For(string id, RavenBaseApiController controller = null) { var connection = connections.GetOrAdd( id, _ => { IEventsTransport logsTransport = null; if (controller != null) { logsTransport = new LogsPushContent(controller); } var connectionState = new AdminLogsConnectionState(logsTransport); TimeSensitiveStore.Missing(id); return(connectionState); }); AlterEnabled(); return(connection); }
public void RegisterResourceHttpTraceTransport(IEventsTransport transport, string resourceName) { var curResourceEventTransports = resourceHttpTraces.GetOrAdd(resourceName); curResourceEventTransports.Add(transport); transport.Disconnected += () => { ConcurrentSet<IEventsTransport> resourceEventTransports; resourceHttpTraces.TryGetValue(resourceName, out resourceEventTransports); if (resourceEventTransports != null) resourceEventTransports.TryRemove(transport); }; }
public void RegisterServerHttpTraceTransport(IEventsTransport transport) { serverHttpTrace.Add(transport); transport.Disconnected += () => serverHttpTrace.TryRemove(transport); }
public void Reconnect(IEventsTransport transport) { eventsTransport = transport; }
public ConnectionState(IEventsTransport eventsTransport) { this.eventsTransport = eventsTransport; }
public AdminLogsConnectionState(IEventsTransport logsTransport) { this.logsTransport = logsTransport; }