A lightweight iterator for scanning memory pages in FASTER, enabling efficient record traversal outside epoch protection and locking.
// Source: https://github.com/microsoft/FASTER | License: MIT | Copyright Microsoft Corporation. All rights reserved
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System;
namespace FASTER.core
{
/// <summary>
/// Lightweight iterator for memory page (copied to buffer). GetNext() can be used outside epoch protection and locking,
/// but ctor must be called within epoch protection.
/// </summary>
/// <typeparam name="Key"></typeparam>
/// <typeparam name="Value"></typeparam>
class MemoryPageScanIterator<Key, Value> : IFasterScanIterator<Key, Value>
{
readonly Record<Key, Value>[] page;
readonly long pageStartAddress;
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key