@Internal public class DenormalisedContentPermissionsUpdater extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_INITIAL_CONTENT_PROCESSING_LIMIT |
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 |
|---|---|
static void |
setInitialContentProcessingBatchSize(int limit) |
int |
updateAllContentPermissions(AtomicBoolean schedulingEnabled,
Supplier<DenormalisedPermissionServiceState> contentServiceStateSupplier)
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 DEFAULT_INITIAL_CONTENT_PROCESSING_LIMIT
public static final int PAGE_PROCESSING_BATCH_SIZE
public DenormalisedContentPermissionsUpdater(org.springframework.transaction.PlatformTransactionManager platformTransactionManager,
DenormalisedSidManager denormalisedSidManager,
DenormalisedContentViewPermissionDao denormalisedContentViewPermissionDao,
RealContentAndPermissionsDao realContentAndPermissionsDao)
public static void setInitialContentProcessingBatchSize(int limit)
public int updateAllContentPermissions(AtomicBoolean schedulingEnabled, Supplier<DenormalisedPermissionServiceState> contentServiceStateSupplier) 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–2022 Atlassian. All rights reserved.