public bool DeleteStore(InMemoryStore store)
 {
     lock (this) {
         try {
             return(nameStoreMap.Remove(store.Name));
         } finally {
             store.Dispose();
         }
     }
 }
        public bool CloseStore(InMemoryStore store)
        {
            lock (this) {
                if (!nameStoreMap.ContainsKey(store.Name))
                {
                    throw new IOException($"The store '{store.Name}' was not found in the system");
                }

                return(true);
            }
        }
        public InMemoryStore CreateStore(string name, IConfiguration configuration)
        {
            var hashSize = configuration.GetInt32("hashSize", 1024);

            lock (this) {
                if (nameStoreMap.ContainsKey(name))
                {
                    throw new IOException($"A store named '{name}' already in the systme");
                }

                var store = new InMemoryStore(name, hashSize);
                nameStoreMap[name] = store;
                return(store);
            }
        }
 public LargeObjectStoreTests()
 {
     system = new InMemoryStoreSystem();
     store  = system.CreateStore("lob_store", new Configuration());
 }