using System.Collections.Generic; namespace ZeroLevel.Services.PartitionStorage { /// /// Provides read/reindex operations in catalog partition /// /// Key type /// Type of one input value /// Type of records aggregate public interface IStorePartitionAccessor : IStorePartitionBase { /// /// Rebuilds indexes for data in a partition /// void RebuildIndex(); /// /// Search in a partition for a specified key /// StorePartitionKeyValueSearchResult Find(TKey key); /// /// Search in a partition for a specified keys /// IEnumerable> Find(IEnumerable keys); /// /// Iterating over all recorded data /// IEnumerable> Iterate(); /// /// Iterating over all recorded data of the file with the specified key /// IEnumerable> IterateKeyBacket(TKey key); /// /// Deleting the specified key and associated data /// /// Key /// true - automatically rebuild the index of the file from which data was deleted (default = false) void RemoveKey(TKey key, bool autoReindex = false); /// /// Deleting the specified keys and associated data /// /// Keys /// true - automatically rebuild the index of the file from which data was deleted (default = true) void RemoveKeys(IEnumerable keys, bool autoReindex = true); /// /// Delete all keys with data except the specified key /// /// Key /// true - automatically rebuild the index of the file from which data was deleted (default = true) void RemoveAllExceptKey(TKey key, bool autoReindex = true); /// /// Delete all keys with data other than the specified ones /// /// Keys /// true - automatically rebuild the index of the file from which data was deleted (default = true) void RemoveAllExceptKeys(IEnumerable keys, bool autoReindex = true); } }