public final class CalendarSyncEngine

  1. Object
  2. CalendarSyncEngine
Opt-in local-first mutation queue. It deliberately does not own credentials or silently schedule work; applications call sync() or connect it to a platform background-work callback.

Constructors

public CalendarSyncEngine(CalendarSource source, CalendarCache cache) throws CalendarException

Methods

public synchronized String queueEventSave(CalendarEvent event, CalendarMutationScope scope) throws CalendarException
public synchronized String queueEventDelete(String calendarId, String eventId, String version, CalendarMutationScope scope) throws CalendarException
public synchronized String queueTaskSave(CalendarTask task, CalendarMutationScope scope) throws CalendarException
public synchronized String queueTaskDelete(String calendarId, String taskId, String version, CalendarMutationScope scope) throws CalendarException
public synchronized int getPendingCount()
public synchronized AsyncResource<CalendarSyncResult> sync()
public synchronized void resolveConflict(String mutationId, CalendarConflict.Resolution resolution, Map<String, Object> merged) throws CalendarException

Inherited methods

Constructor details

CalendarSyncEngine

public CalendarSyncEngine(CalendarSource source, CalendarCache cache) throws CalendarException

Method details

queueEventSave

public synchronized String queueEventSave(CalendarEvent event, CalendarMutationScope scope) throws CalendarException

queueEventDelete

public synchronized String queueEventDelete(String calendarId, String eventId, String version, CalendarMutationScope scope) throws CalendarException

queueTaskSave

public synchronized String queueTaskSave(CalendarTask task, CalendarMutationScope scope) throws CalendarException

queueTaskDelete

public synchronized String queueTaskDelete(String calendarId, String taskId, String version, CalendarMutationScope scope) throws CalendarException

getPendingCount

public synchronized int getPendingCount()

sync

public synchronized AsyncResource<CalendarSyncResult> sync()

resolveConflict

public synchronized void resolveConflict(String mutationId, CalendarConflict.Resolution resolution, Map<String, Object> merged) throws CalendarException