Class EventTokenChangedCacheRefresher
java.lang.Object
com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher
- All Implemented Interfaces:
CacheRefresher
-
Field Summary
Fields inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
remoteDirectory
-
Constructor Summary
ConstructorsConstructorDescriptionEventTokenChangedCacheRefresher
(RemoteCrowdDirectory crowdDirectory, CacheRefresher fullSyncCacheRefresher) -
Method Summary
Modifier and TypeMethodDescriptionsynchroniseAll
(DirectoryCache directoryCache) Will visit all Users and Groups in the external directory in order to do a Full refresh.protected PartialSynchronisationResult<? extends GroupWithAttributes>
synchroniseAllGroups
(DirectoryCache directoryCache) This method is expected to fetch the groups to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding).protected PartialSynchronisationResult<? extends UserWithAttributes>
synchroniseAllUsers
(DirectoryCache directoryCache) This method is expected to fetch the users to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding).synchroniseChanges
(DirectoryCache directoryCache, String eventToken) Attempts to synchronise changes since the last refresh as opposed to performing a full synchronisation.Methods inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
directoryDescription, getMemberships, isGroupAttributeSynchronisationEnabled, isIncrementalSyncEnabled, isUserAttributeSynchronisationEnabled, synchroniseAllGroupAttributes, synchroniseAllUserAttributes, synchroniseMemberships
-
Constructor Details
-
EventTokenChangedCacheRefresher
public EventTokenChangedCacheRefresher(RemoteCrowdDirectory crowdDirectory, CacheRefresher fullSyncCacheRefresher)
-
-
Method Details
-
synchroniseAll
public CacheSynchronisationResult synchroniseAll(DirectoryCache directoryCache) throws OperationFailedException Description copied from interface:CacheRefresher
Will visit all Users and Groups in the external directory in order to do a Full refresh.- Specified by:
synchroniseAll
in interfaceCacheRefresher
- Overrides:
synchroniseAll
in classAbstractCacheRefresher
- Parameters:
directoryCache
- the DirectoryCache to update.- Returns:
- result of synchronisation
- Throws:
OperationFailedException
- if there was an error processing the operation
-
synchroniseChanges
public CacheSynchronisationResult synchroniseChanges(DirectoryCache directoryCache, @Nullable String eventToken) throws OperationFailedException Description copied from interface:CacheRefresher
Attempts to synchronise changes since the last refresh as opposed to performing a full synchronisation. Returns true if changes since the last refresh were synchronised successfully.- Parameters:
directoryCache
- the DirectoryCache to update.- Returns:
- result of the synchronisation
- Throws:
OperationFailedException
- if there was an error processing the operation
-
synchroniseAllUsers
protected PartialSynchronisationResult<? extends UserWithAttributes> synchroniseAllUsers(DirectoryCache directoryCache) throws OperationFailedException Description copied from class:AbstractCacheRefresher
This method is expected to fetch the users to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding). This will only fetch user attributes when user attribute synchronisation is enabled. User attributes will be updated if fetched inAbstractCacheRefresher.synchroniseAll(DirectoryCache)
if the directory allows that.- Specified by:
synchroniseAllUsers
in classAbstractCacheRefresher
- Parameters:
directoryCache
- the cache which this method should update- Returns:
- list of users that were passed into the directory cache and an optional sync token if the directory has separate sync tokens for users and groups
- Throws:
OperationFailedException
-
synchroniseAllGroups
protected PartialSynchronisationResult<? extends GroupWithAttributes> synchroniseAllGroups(DirectoryCache directoryCache) throws OperationFailedException Description copied from class:AbstractCacheRefresher
This method is expected to fetch the groups to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding). This will only fetch group attributes when group attribute synchronisation is enabled. Group attributes will be updated if fetched inAbstractCacheRefresher.synchroniseAll(DirectoryCache)
if the directory allows that.- Specified by:
synchroniseAllGroups
in classAbstractCacheRefresher
- Parameters:
directoryCache
- the cache which this method should update- Returns:
- list of groups that were passed into the directory cache and an optional sync token if the directory has separate sync tokens for users and groups
- Throws:
OperationFailedException
-