# Class CalendarSyncEngine

java.lang.Object
com.codename1.calendar.CalendarSyncEngine

public final class CalendarSyncEngine extends Object
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.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CalendarSyncEngine(CalendarSource source, CalendarCache cache)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getPendingCount()`
  `String`
  `queueEventDelete(String calendarId, String eventId, String version, CalendarMutationScope scope)`
  `String`
  `queueEventSave(CalendarEvent event, CalendarMutationScope scope)`
  `String`
  `queueTaskDelete(String calendarId, String taskId, String version, CalendarMutationScope scope)`
  `String`
  `queueTaskSave(CalendarTask task, CalendarMutationScope scope)`
  `void`
  `resolveConflict(String mutationId, CalendarConflict.Resolution resolution, Map<String,Object> merged)`
  `AsyncResource<CalendarSyncResult>`
  `sync()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CalendarSyncEngine

    public CalendarSyncEngine(CalendarSource source, CalendarCache cache) throws CalendarException
    Throws:
      `CalendarException`

- ## Method Details

  - ### queueEventSave

    public String queueEventSave(CalendarEvent event, CalendarMutationScope scope) throws CalendarException
    Throws:
      `CalendarException`

  - ### queueEventDelete

    public String queueEventDelete(String calendarId, String eventId, String version, CalendarMutationScope scope) throws CalendarException
    Throws:
      `CalendarException`

  - ### queueTaskSave

    public String queueTaskSave(CalendarTask task, CalendarMutationScope scope) throws CalendarException
    Throws:
      `CalendarException`

  - ### queueTaskDelete

    public String queueTaskDelete(String calendarId, String taskId, String version, CalendarMutationScope scope) throws CalendarException
    Throws:
      `CalendarException`

  - ### getPendingCount

    public int getPendingCount()

  - ### sync

    public AsyncResource<CalendarSyncResult> sync()

  - ### resolveConflict

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