TICDSVacuumOperation Class Reference
| Inherits from | TICDSOperation : NSOperation |
| Declared in | TICDSVacuumOperation.h |
Overview
The TICDSVacuumOperation class describes a generic operation used by the TICoreDataSync framework to clean up unneeded files used to synchronize documents.
The operation carries out the following tasks:
- Find out the date of the oldest
WholeStore. - Find out the date of the least recent client sync.
- Remove all
SyncChangeSetfiles older than whichever date is earlier.
Currently unimplemented, it also needs to carry out the following:
1. Create sync commands to remove the ids of these sync change sets from each client’s AppliedSyncChangeSets.ticdsync file.
2. Remove all SyncCommandSet files older than the least recent sync.
3. Create sync commands to remove the ids of these sync command sets from each client’s AppliedSyncCommandSets.ticdsync file.
Operations are typically created automatically by the relevant document sync manager.
You must use one of the subclasses of TICDSVacuumOperation.
Tasks
Methods Overridden by Subclasses
-
– findOutDateOfOldestWholeStoreDetermine the modification date of the oldest
WholeStorefile uploaded by any client. -
– findOutLeastRecentClientSyncDateDetermine the date on which the least-recently-synchronized client last performed a sync.
-
– removeOldSyncChangeSetFilesRemove all
SyncChangeSetfiles uploaded by this client which are older thanearliestDateForFilesToKeep.
Callbacks
-
– foundOutDateOfOldestWholeStoreFile:Indicate the date of the oldest
WholeStorefile. -
– foundOutLeastRecentClientSyncDate:Indicate the date of the least recent sync.
-
– removedOldSyncChangeSetFilesWithSuccess:Indicate whether the removal of old
SyncChangeSetfiles was successful.
Properties
-
earliestDateForFilesToKeepThe earliest modification date after which files must be kept.
property
Instance Methods
findOutDateOfOldestWholeStore
Determine the modification date of the oldest WholeStore file uploaded by any client.
- (void)findOutDateOfOldestWholeStoreDiscussion
This method must call foundOutDateOfOldestWholeStoreFile: when finished.
Declared In
TICDSVacuumOperation.hfindOutLeastRecentClientSyncDate
Determine the date on which the least-recently-synchronized client last performed a sync.
- (void)findOutLeastRecentClientSyncDateDiscussion
This method must call foundOutLeastRecentClientSyncDate: when finished.
Declared In
TICDSVacuumOperation.hfoundOutDateOfOldestWholeStoreFile:
Indicate the date of the oldest WholeStore file.
- (void)foundOutDateOfOldestWholeStoreFile:(NSDate *)aDateParameters
- aDate
The modification date of the oldest
WholeStorefile.
Discussion
If an error occurs, call setError: first, then specify nil for aDate. If no client has uploaded a WholeStore, specify [NSDate date].
Declared In
TICDSVacuumOperation.hfoundOutLeastRecentClientSyncDate:
Indicate the date of the least recent sync.
- (void)foundOutLeastRecentClientSyncDate:(NSDate *)aDateParameters
- aDate
The date of the least recent sync.
Discussion
If an error occurs, call setError: first, then specify nil for aDate.
Declared In
TICDSVacuumOperation.hremoveOldSyncChangeSetFiles
Remove all SyncChangeSet files uploaded by this client which are older than earliestDateForFilesToKeep.
- (void)removeOldSyncChangeSetFilesDiscussion
This method must call removedOldSyncChangeSetFilesWithSuccess: when finished.
Declared In
TICDSVacuumOperation.hremovedOldSyncChangeSetFilesWithSuccess:
Indicate whether the removal of old SyncChangeSet files was successful.
- (void)removedOldSyncChangeSetFilesWithSuccess:(BOOL)successParameters
- success
YESif the old sync change set files for this operation were removed, otherwiseNO.
Discussion
If not, call setError: first, then specify NO for success.
Declared In
TICDSVacuumOperation.h