Class UsnChangedCacheRefresher
java.lang.Object
com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher<LDAPGroupWithAttributes>
com.atlassian.crowd.directory.synchronisation.cache.UsnChangedCacheRefresher
- All Implemented Interfaces:
CacheRefresher
public class UsnChangedCacheRefresher
extends AbstractCacheRefresher<LDAPGroupWithAttributes>
implements CacheRefresher
Retrieves the latest changes from MS Active Directory in order to allow "delta" cache refreshes.
See this and this for details on polling Microsoft Active Directory.
This class is guaranteed to be run from a single thread at a time by per directory. This means it does not need to worry about race-conditions, but still must consider safe publication of variables (per directory).
The incremental sync of users comes in two flavors: see SystemProperties.USE_LEGACY_AD_INCREMENTAL_SYNC.
-
Field Summary
Fields inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
remoteDirectory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Iterable<Membership>getMemberships(Collection<LDAPGroupWithAttributes> groupsToInclude, boolean isFullSync) synchroniseAll(DirectoryCache directoryCache) synchroniseAllGroups(DirectoryCache directoryCache) protected PartialSynchronisationResult<? extends UserWithAttributes>synchroniseAllUsers(DirectoryCache directoryCache) synchroniseChanges(DirectoryCache directoryCache, String highestCommittedUsn) protected voidsynchroniseMemberships(Collection<LDAPGroupWithAttributes> remoteGroups, DirectoryCache directoryCache, boolean isFullSync) Methods inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
directoryDescription, isGroupAttributeSynchronisationEnabled, isIncrementalSyncEnabled, isUserAttributeSynchronisationEnabled, synchroniseAllGroupAttributes, synchroniseAllUserAttributes
-
Constructor Details
-
UsnChangedCacheRefresher
-
-
Method Details
-
synchroniseChanges
public CacheSynchronisationResult synchroniseChanges(DirectoryCache directoryCache, @Nullable String highestCommittedUsn) throws OperationFailedException - Specified by:
synchroniseChangesin interfaceCacheRefresher- Throws:
OperationFailedException
-
synchroniseAll
public CacheSynchronisationResult synchroniseAll(DirectoryCache directoryCache) throws OperationFailedException - Specified by:
synchroniseAllin interfaceCacheRefresher- Overrides:
synchroniseAllin classAbstractCacheRefresher<LDAPGroupWithAttributes>- Throws:
OperationFailedException
-
synchroniseAllUsers
protected PartialSynchronisationResult<? extends UserWithAttributes> synchroniseAllUsers(DirectoryCache directoryCache) throws OperationFailedException - Specified by:
synchroniseAllUsersin classAbstractCacheRefresher<LDAPGroupWithAttributes>- Throws:
OperationFailedException
-
synchroniseAllGroups
protected PartialSynchronisationResult<LDAPGroupWithAttributes> synchroniseAllGroups(DirectoryCache directoryCache) throws OperationFailedException - Specified by:
synchroniseAllGroupsin classAbstractCacheRefresher<LDAPGroupWithAttributes>- Throws:
OperationFailedException
-
synchroniseMemberships
protected void synchroniseMemberships(Collection<LDAPGroupWithAttributes> remoteGroups, DirectoryCache directoryCache, boolean isFullSync) throws OperationFailedException - Overrides:
synchroniseMembershipsin classAbstractCacheRefresher<LDAPGroupWithAttributes>- Throws:
OperationFailedException
-
getMemberships
protected Iterable<Membership> getMemberships(Collection<LDAPGroupWithAttributes> groupsToInclude, boolean isFullSync) throws OperationFailedException - Overrides:
getMembershipsin classAbstractCacheRefresher<LDAPGroupWithAttributes>- Throws:
OperationFailedException
-