mirror of
https://github.com/ZoneTree/ZoneTree.git
synced 2026-10-19 06:58:48 +08:00
1.9 KiB
1.9 KiB
API Overview
This page gives a quick map of the main API areas.
Tree
IZoneTree<TKey, TValue> is the main non-transactional interface.
Important methods:
TryGetContainsKeyUpsertTryAddTryDeleteForceDeleteCreateIteratorCreateReverseIteratorCreateMaintainerCountCountFullScan
Atomic Methods
Atomic methods synchronize same-key read-modify-write operations across LSM-tree segments.
Important methods:
TryAtomicGetAndUpdateTryAtomicAddTryAtomicUpdateTryAtomicAddOrUpdateAtomicUpsert
Use them only when the next value depends on the current value.
Transactions
Transactional trees coordinate multi-key changes.
Important areas:
BeginTransactionBeginFluentTransaction- read/write with transaction id
PreparePrepareAndCommitCommitRollbackReadCommittedTryGetUpsertAutoCommitDeleteAutoCommit- exceptionless transaction APIs,
- fluent transaction APIs.
Maintenance
Maintenance APIs expose segment lifecycle operations and events.
Use the maintainer for standard background maintenance. Use low-level maintenance APIs when building custom storage services.
Important metrics:
MutableSegmentRecordCountReadOnlySegmentsCountReadOnlySegmentsRecordCountInMemoryRecordCountTotalRecordCountIsMergingIsBottomSegmentsMerging
Important operations:
MoveMutableSegmentForwardStartMergeOperationStartBottomSegmentsMergeOperationSaveMetaDataReleaseReadBuffersReleaseCircularKeyCacheRecordsReleaseCircularValueCacheRecords
Iterators
Iterators scan in key order or reverse key order. Use Seek for range scans.
Dispose iterators promptly.
Iterator options:
IteratorType.AutoRefreshIteratorType.NoRefreshIteratorType.SnapshotIteratorType.ReadOnlyRegionincludeDeletedRecordscontributeToTheBlockCache