public class DenormalisedSpacePermissionsUpdater extends Object implements org.springframework.beans.factory.DisposableBean
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_SPACE_PROCESSING_LIMIT |
Constructor and Description |
---|
DenormalisedSpacePermissionsUpdater(com.atlassian.event.api.EventPublisher eventPublisher,
DenormalisedSpacePermissionDao denormalisedSpacePermissionDao,
SpacePermissionDao spacePermissionDao,
DenormalisedSidManager denormalisedSidManager,
org.springframework.transaction.PlatformTransactionManager platformTransactionManager,
SpaceDaoInternal spaceDao) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
handleSpacePermissionChangeEvent(SpacePermissionChangeEvent spacePermissionChangeEvent) |
void |
init() |
int |
updateAllSpacePermissions(AtomicBoolean schedulingEnabled)
Updates all space permissions.
|
Set<Long> |
updateSpacePermissions(Set<Long> spaceIds)
Calculates effective permissions for spaces and updates denormalised space permission records.
|
Set<Long> |
updateSpacePermissions(Set<Long> spaceIds,
Long deadline)
Calculates effective permissions for spaces and updates denormalised space permission records.
|
public DenormalisedSpacePermissionsUpdater(com.atlassian.event.api.EventPublisher eventPublisher, DenormalisedSpacePermissionDao denormalisedSpacePermissionDao, SpacePermissionDao spacePermissionDao, DenormalisedSidManager denormalisedSidManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, SpaceDaoInternal spaceDao)
@PostConstruct public void init()
@EventListener public void handleSpacePermissionChangeEvent(SpacePermissionChangeEvent spacePermissionChangeEvent)
public Set<Long> updateSpacePermissions(Set<Long> spaceIds)
spaceIds
- list of space id for updatingpublic Set<Long> updateSpacePermissions(Set<Long> spaceIds, Long deadline)
spaceIds
- list of space id for updatingdeadline
- processing should stop after this time. Null means "no deadline"public int updateAllSpacePermissions(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.ExecutionException
InterruptedException
Copyright © 2003–2021 Atlassian. All rights reserved.