Pooling Incoming Synchronization

The pooling synchronization is new to the Engine v8.1 and is supported on both Windows and macOS platforms. During pooling synchronization the Engine traverses all folders loaded on the client and calls IFolder.GetChildrenAsync() for each folder to get new folder content from your remote storage. The Engine compares folder content and creates, updates and deletes items on the client.

To find if an item content or metadata is modified the Engine will use IFileSystemItemMetadata.MetadataETag and IFileMetadata.ContentETag properties. See the Detecting Content and Metadata Changes article for more details.

To run one-time synchronization you can call the IncomingPooling.ProcessAsync() method:

await engine.SyncService.IncomingPooling.ProcessAsync();

You will run one-time synchronization using the ProcessAsync() call for ample in CRUD more after your server connection was restored. 

Timer Pooling Mode

If your remote storage does not provide any notifications via web sockets CRUD operations or Sync ID algorithm you can configure pooling to run periodically on timer. Set the IncomingSyncMode property to IncomingSyncMode.TimerPooling value and set the pooling interval in milliseconds:

Engine.SyncService.IncomingSyncMode = IncomingSyncMode.TimerPooling;

// Set sync interval for both incoming and outgoing sync.
Engine.SyncService.SyncIntervalMs = Settings.SyncIntervalMs;

Note that you do not have to call the IncomingPooling.ProcessAsync() manually in this case.

Next Article:

CRUD Incoming Synchronization