You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace ZeroLevel.Services.PartitionStorage
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides read-write operations in catalog partition
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="TKey">Key type</typeparam>
|
|
|
|
|
/// <typeparam name="TInput">Type of one input value</typeparam>
|
|
|
|
|
/// <typeparam name="TValue">Type of records aggregate</typeparam>
|
|
|
|
|
public interface IStorePartitionAccessor<TKey, TInput, TValue>
|
|
|
|
|
: IDisposable
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Save one record
|
|
|
|
|
/// </summary>
|
|
|
|
|
void Store(TKey key, TInput value);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Complete the recording and perform the conversion of the records from
|
|
|
|
|
/// (TKey; TInput) to (TKey; TValue)
|
|
|
|
|
/// </summary>
|
|
|
|
|
void CompleteStoreAndRebuild();
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Rebuild indexes
|
|
|
|
|
/// </summary>
|
|
|
|
|
void RebuildIndex();
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Find in catalog partition by key
|
|
|
|
|
/// </summary>
|
|
|
|
|
StorePartitionKeyValueSearchResult<TKey, TValue> Find(TKey key);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Find in catalog partition by keys
|
|
|
|
|
/// </summary>
|
|
|
|
|
IEnumerable<StorePartitionKeyValueSearchResult<TKey, TValue>> Find(IEnumerable<TKey> keys);
|
|
|
|
|
IEnumerable<StorePartitionKeyValueSearchResult<TKey, TValue>> Iterate();
|
|
|
|
|
IEnumerable<StorePartitionKeyValueSearchResult<TKey, TValue>> IterateKeyBacket(TKey key);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Has any files
|
|
|
|
|
/// </summary>
|
|
|
|
|
int CountDataFiles();
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Remove all files
|
|
|
|
|
/// </summary>
|
|
|
|
|
void DropData();
|
|
|
|
|
}
|
|
|
|
|
}
|