ZDCPushManager

@interface ZDCPushManager : NSObject

The PushManager handles pushing changes up to the cloud.

The sync process can be broken down into 2 components: Push & Pull. If you’ve used git before, you’re already familiar with the process. You push changes (made locally) to the cloud. And you pull changes (made on remote devices) from the cloud.

This class handles the PUSH side of things.

  • Stops all in-flight uploads for the given {localUserID, treeID} tuple.

    The active uploads are cancelled, but they’re not removed from the push queue. That is, the active network tasks that are pushing data up to the cloud are stopped. But the corresponding ZDCCloudOperation’s are still stored in the database, so they will be restarted the next time the PushManager starts executing operations.

    To be useful, this method is usually paired with a corresponding call to pause the push queue.

    You’re encouraged to use the SyncManager instead of calling this method directly.

    See

    [ZDCSyncManager pausePushForLocalUserID:andAbortUploads:]

    Declaration

    Objective-C

    - (void)abortOperationsForLocalUserID:(NSString *)localUserID
                                   treeID:(NSString *)treeID;

    Swift

    func abortOperations(forLocalUserID localUserID: String!, treeID: String!)
  • Stops in-flight uploads for the given list of operations.

    The active uploads are cancelled, but they’re not removed from the push queue. That is, the active network tasks that are pushing data up to the cloud are stopped. But the corresponding ZDCCloudOperation’s are still stored in the database, so they will be restarted the next time the PushManager starts executing operations.

    Declaration

    Objective-C

    - (void)abortOperations:(NSArray<ZDCCloudOperation *> *)operations;

    Swift

    func abortOperations(_ operations: [ZDCCloudOperation]!)