• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • SyncSection
  • SyncSection Class

    One named tree of path-addressed values that two nodes keep in sync. More...

    Header: #include <SyncSection>
    Inherits: QObject

    Detailed Description

    A SyncSection wraps a SyncTree and adds the policy around it: who may write (the section's SyncOwnership, with optional per-path overrides), subscription state, transactions with rollback, and the cursors that show which peer views or edits a path. A local write marks the path dirty. ConfigSyncCourier encodes the dirty paths as deltas, sends them, and applies the deltas and acks that come back.

    An optimistic write holds its value until the remote side acks it. If no ack arrives in time, checkOptimisticTimeouts() rolls it back and the section emits valueRolledBack(). A write that the authority policy refuses emits valueRejected() and does not change the value.

    ConfigSyncService creates and owns each section; get one from ConfigSyncService::registerSection().