MeshConfig class

Configuration of a peer-to-peer mesh sync.

A mesh sync enables peer-to-peer (P2P) synchronization between sync clients without a central server. Pass an instance to the SyncClient constructor (via its mesh parameter) to attach a mesh sync to the client; it starts and stops together with the client. Query the running mesh via SyncClient.mesh.

Only meshId is required; all other values are optional and fall back to the defaults of the ObjectBox runtime library when left null.

Properties

advertisingDelayMillis int?
Delay in milliseconds before advertising starts after the mesh sync starts (default: 2000).
final
advertisingRetryMaxMillis int?
Upper bound in milliseconds for the advertising retry backoff (default: 60000). Must be >= advertisingRetryMillis.
final
advertisingRetryMillis int?
Base delay in milliseconds before retrying advertising after a network failed to start it (default: 5000).
final
backoffMillis int?
Backoff time in milliseconds before retrying a failed connection (default: 10000).
final
connectDelayMillis int?
Minimum delay in milliseconds between two outgoing connection attempts (default: 1000).
final
discoveryDurationSeconds int?
Duration in seconds of a standard (non-initial) discovery phase (default: 15; 0 means never stop by time).
final
discoveryPauseJitterSeconds int?
Random +/- jitter in seconds applied to the discovery pause (default: 15; must be <= pause). 0 disables jitter.
final
discoveryPauseSeconds int?
Pause in seconds between two discovery phases (default: 45).
final
evictionBackoffMillis int?
Backoff time in milliseconds between peer evictions (default: 30000).
final
hashCode int
The hash code for this object.
no setterinherited
initialDiscoveryDurationSeconds int?
Duration in seconds of the initial discovery phase (default: 30; 0 means never stop by time).
final
maxConnectionCount int?
Max number of simultaneous connections a peer can have to other peers (default: 3).
final
meshId String
The mesh network identifier (required); nodes with different IDs ignore each other.
final
randomSeed int?
Seed for the random engine; 0 means use the current time (default: 0).
final
requestTimeoutMillis int?
Timeout in milliseconds for a TX request from a peer before retrying from another (default: 5000).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
txLogBatchMaxCount int?
Max number of TX logs to batch into a single TxLogData message (default: 1000). Must be in the range (0, 100000].
final
txLogBatchSizeKb int?
Soft cap in KB for the total TX log payload batched into a single TxLogData message (default: 100).
final
txLogMaxAgeSeconds int?
Maximum age in seconds of TX logs kept in the local mesh storage (default: 8 hours).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited