public static void Initialize(int webSocketPoolSizeInBytes) { if (Instance != null) return; Instance = new WebSocketBufferPool(webSocketPoolSizeInBytes); }
public RavenDBOptions(InMemoryRavenConfiguration configuration, DocumentDatabase db = null) { if (configuration == null) throw new ArgumentNullException("configuration"); try { HttpEndpointRegistration.RegisterHttpEndpointTarget(); HttpEndpointRegistration.RegisterAdminLogsTarget(); if (db == null) { configuration.UpdateDataDirForLegacySystemDb(); systemDatabase = new DocumentDatabase(configuration); systemDatabase.SpinBackgroundWorkers(); } else { systemDatabase = db; } fileSystemLandlord = new FileSystemsLandlord(systemDatabase); databasesLandlord = new DatabasesLandlord(systemDatabase); countersLandlord = new CountersLandlord(systemDatabase); requestManager = new RequestManager(databasesLandlord); mixedModeRequestAuthorizer = new MixedModeRequestAuthorizer(); webSocketBufferPool = new WebSocketBufferPool(configuration.WebSockets.InitialBufferPoolSize); mixedModeRequestAuthorizer.Initialize(systemDatabase, new RavenServer(databasesLandlord.SystemDatabase, configuration)); } catch { if (systemDatabase != null) systemDatabase.Dispose(); throw; } }
public static void Initialize(int webSocketPoolSizeInBytes) { if (Instance != null) { return; } Instance = new WebSocketBufferPool(webSocketPoolSizeInBytes); }