@Internal public class DenormalisedContentPermissionsUpdater extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_CONTENT_PROCESSING_BATCH_SIZE
The size of the page batch retrieved from CONTENT table.
|
static int |
PAGE_PROCESSING_BATCH_SIZE
The size of the page batch for updating permissions in one transaction.
|
| Constructor and Description |
|---|
DenormalisedContentPermissionsUpdater(org.springframework.transaction.PlatformTransactionManager platformTransactionManager,
DenormalisedSidManager denormalisedSidManager,
DenormalisedContentViewPermissionDao denormalisedContentViewPermissionDao,
RealContentAndPermissionsDao realContentAndPermissionsDao) |
| Modifier and Type | Method and Description |
|---|---|
int |
updateAllContentPermissions(AtomicBoolean schedulingEnabled)
Updates all content permissions.
|
Set<Long> |
updateContentViewPermissions(Set<Long> pageIds,
long deadline)
Updates denormalised content permissions for the set of page ids.
|
public static final int INITIAL_CONTENT_PROCESSING_BATCH_SIZE
public static final int PAGE_PROCESSING_BATCH_SIZE
public DenormalisedContentPermissionsUpdater(org.springframework.transaction.PlatformTransactionManager platformTransactionManager,
DenormalisedSidManager denormalisedSidManager,
DenormalisedContentViewPermissionDao denormalisedContentViewPermissionDao,
RealContentAndPermissionsDao realContentAndPermissionsDao)
public int updateAllContentPermissions(AtomicBoolean schedulingEnabled) throws ExecutionException, InterruptedException
schedulingEnabled - Reference to DenormalisedChangeLogListenerBase#schedulingEnabled
Scheduled task (cron) can be disabled mid-processing, so it's necessary to keep a reference
and check this value periodically. For example, it would happen when Confluence is shutting down.ExecutionExceptionInterruptedExceptionpublic Set<Long> updateContentViewPermissions(Set<Long> pageIds, long deadline)
pageIds - set of page ids to processdeadline - deadline. Should stop stop processing records after the deadlineCopyright © 2003–2021 Atlassian. All rights reserved.