public class DefaultSynchronyDataService extends Object implements SynchronyDataService
| Constructor and Description | 
|---|
DefaultSynchronyDataService(SynchronyLockManager lockManager,
                           SynchronyEvictionDao evictionDao,
                           SynchronyEvictionProgressTracking progressTracking,
                           PageManager pageManager)  | 
| Modifier and Type | Method and Description | 
|---|---|
SynchronyRowsCount | 
currentSynchronyDatasetSize(Long contentId)
If the parameter  is not null, returns size of Synchrony history for that entity. 
 | 
void | 
dataCleanUpAfterTurningOffCollabEditing(String appId)
This method cleans up Synchrony data after turning Collaboration Editing off. 
 | 
void | 
hardRemoveHistoryOlderThan(int thresholdHours)
Remove all events from content entities, which have any data older than . 
 | 
void | 
removeApplicationCredentials(String applicationId)
Remove application credentials from Synchrony tables 
 | 
void | 
removeHistoryFor(ContentId contentId)
This method removes Synchrony history for given content. 
 | 
void | 
softRemoveHistoryOlderThan(int thresholdHours,
                          int contentCount)
Remove approximately  content records from Synchrony history, which are older than
  and are safe for removal. 
 | 
public DefaultSynchronyDataService(SynchronyLockManager lockManager, SynchronyEvictionDao evictionDao, SynchronyEvictionProgressTracking progressTracking, PageManager pageManager)
public SynchronyRowsCount currentSynchronyDatasetSize(Long contentId)
SynchronyDataServicecurrentSynchronyDatasetSize in interface SynchronyDataServicepublic void softRemoveHistoryOlderThan(int thresholdHours,
                                       int contentCount)
SynchronyDataServiceSynchronyDataService.hardRemoveHistoryOlderThan(int).
 The main purpose of this method is disk space cleanup in collab editing tables. Parameter allows to shift trade-off between removal efficiency (disk reclaiming) and the degree of intrusiveness.
The method is executed synchronously in the same thread. If exception is thrown somewhere in the middle, it is possible to have only a part of data removed, because the removal might happen in several transactions, but remaining data will always stay consistent (e.g. synchrony data consistent with content properties).
softRemoveHistoryOlderThan in interface SynchronyDataServicepublic void hardRemoveHistoryOlderThan(int thresholdHours)
SynchronyDataService
 The method guarantees to remove old personal data in order to be compliant with regulations. If the customer doesn't
 care about any regulations, it shouldn't generally call the method, instead less intrusive
 SynchronyDataService.softRemoveHistoryOlderThan(int, int) should be used.
 
The method is executed synchronously in the same thread. If exception is thrown somewhere in the middle, it is possible to have only a part of data removed, because the removal might happen in several transactions, but remaining data will always stay consistent (e.g. synchrony data consistent with content properties).
hardRemoveHistoryOlderThan in interface SynchronyDataServicepublic void removeHistoryFor(ContentId contentId)
SynchronyDataServicePage or
 BlogPost, IllegalArgumentException is thrown.
 IMPORTANT: please keep in mind, that this method deletes Synchrony history for provided page or blog. If Synchrony
 history is needed f.e. to conduct analysis of the problem, caller should fetch and save it BEFORE invocation of
 this method.removeHistoryFor in interface SynchronyDataServicecontentId - id of the content, which history has to be cleaned up. Should not be null.public void removeApplicationCredentials(String applicationId)
SynchronyDataServiceremoveApplicationCredentials in interface SynchronyDataServiceapplicationId - id of application to removepublic void dataCleanUpAfterTurningOffCollabEditing(String appId)
SynchronyDataServicedataCleanUpAfterTurningOffCollabEditing in interface SynchronyDataServiceappId - id of application to removeCopyright © 2003–2023 Atlassian. All rights reserved.