Interface DenormalisedPermissionStateManager
- All Known Implementing Classes:
DenormalisedPermissionStateManagerImpl
@ExperimentalApi
@Internal
public interface DenormalisedPermissionStateManager
Denormalised permission state manager is responsible to managing the service state,
including starting, stopping, enabling/disabling API, maintaining list of the past events etc
- Since:
- 7.11.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disableService
(boolean cleanDenormalisedData) Disables the service and deletes all triggers/functions, so denormalised data will not be updated.void
Enables the service.Returns the time difference between updating regular content permissions and denormalised content permissionsgetContentServiceState
(boolean realTimeData) Get the state of denormalised content service.Returns the time difference between updating regular space permissions and denormalised space permissionsgetSpaceServiceState
(boolean realTimeData) Get the state of denormalised space service.getStateChangeLog
(int limit) Returns a list of service state change eventsboolean
Returns true if the state of the service is "READY", if both CONTENT and SPACE services are in ready state Possible reasons for returning false: 1.boolean
Returns true if the state of denormalised CONTENT service is "READY", which means that denormalised content permissions reflect real permissions.boolean
Returns true if the state of denormalised SPACE service is "READY", which means that denormalised space permissions reflect real permissions.void
-
Method Details
-
isApiReady
boolean isApiReady()Returns true if the state of the service is "READY", if both CONTENT and SPACE services are in ready state Possible reasons for returning false: 1. Service is disabled 2. Denormalized tables are not ready- Returns:
- the state of the service
-
isSpaceApiReady
boolean isSpaceApiReady()Returns true if the state of denormalised SPACE service is "READY", which means that denormalised space permissions reflect real permissions. Possible reasons for returning false: 1. Service is disabled 2. Denormalized tables are not ready- Returns:
- the state of the SPACe service
-
isContentApiReady
boolean isContentApiReady()Returns true if the state of denormalised CONTENT service is "READY", which means that denormalised content permissions reflect real permissions. Possible reasons for returning false: 1. Service is disabled 2. Denormalized tables are not ready- Returns:
- the state of the SPACe service
-
getSpaceServiceState
Get the state of denormalised space service.- Parameters:
realTimeData
- if true, data will be read from the DB. If false, cached data will be returned.- Returns:
- the state of denormalised SPACE service
-
getContentServiceState
Get the state of denormalised content service.- Parameters:
realTimeData
- if true, data will be read from the DB. If false, cached data will be returned.- Returns:
- the state of denormalised CONTENT service
-
enableService
void enableService()Enables the service. It would take some time to update denormalised data -
disableService
void disableService(boolean cleanDenormalisedData) Disables the service and deletes all triggers/functions, so denormalised data will not be updated.- Parameters:
cleanDenormalisedData
- - if true, all denormalised data will be truncated
-
getSpacePermissionUpdateLag
Long getSpacePermissionUpdateLag()Returns the time difference between updating regular space permissions and denormalised space permissions- Returns:
- lag in ms, or null if the data record is not found (for example, the service has never been enabled)
-
getContentPermissionUpdateLag
Long getContentPermissionUpdateLag()Returns the time difference between updating regular content permissions and denormalised content permissions- Returns:
- lag in ms, or null if the data record is not found (for example, the service has never been enabled)
-
getStateChangeLog
Returns a list of service state change events- Parameters:
limit
- limit- Returns:
- list or events, sorted by event date (desc)
-
scheduled
void scheduled()
-