public class UsnChangedCacheRefresher extends AbstractCacheRefresher<LDAPGroupWithAttributes> implements CacheRefresher
See http://msdn.microsoft.com/en-us/library/ms677625.aspx and http://msdn.microsoft.com/en-us/library/ms677627%28VS.85%29.aspx 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:
PROPERTY_USE_LEGACY_AD_INCREMENTAL_SYNC
set to true
.Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_USE_LEGACY_AD_INCREMENTAL_SYNC |
remoteDirectory
Constructor and Description |
---|
UsnChangedCacheRefresher(MicrosoftActiveDirectory activeDirectory) |
Modifier and Type | Method and Description |
---|---|
protected Iterable<Membership> |
getMemberships(Collection<LDAPGroupWithAttributes> groupsToInclude,
boolean isFullSync) |
CacheSynchronisationResult |
synchroniseAll(DirectoryCache directoryCache)
Will visit all Users and Groups in the external directory in order to do a Full refresh.
|
protected PartialSynchronisationResult<LDAPGroupWithAttributes> |
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).
|
CacheSynchronisationResult |
synchroniseChanges(DirectoryCache directoryCache,
String highestCommittedUsn)
Attempts to synchronise changes since the last refresh as opposed to performing a full synchronisation.
|
directoryDescription, isGroupAttributeSynchronisationEnabled, isIncrementalSyncEnabled, isUserAttributeSynchronisationEnabled, synchroniseAllGroupAttributes, synchroniseAllUserAttributes, synchroniseMemberships
public static final String PROPERTY_USE_LEGACY_AD_INCREMENTAL_SYNC
public UsnChangedCacheRefresher(MicrosoftActiveDirectory activeDirectory)
public CacheSynchronisationResult synchroniseChanges(DirectoryCache directoryCache, @Nullable String highestCommittedUsn) throws OperationFailedException
CacheRefresher
synchroniseChanges
in interface CacheRefresher
directoryCache
- the DirectoryCache to update.OperationFailedException
- if there was an error processing the operationpublic CacheSynchronisationResult synchroniseAll(DirectoryCache directoryCache) throws OperationFailedException
CacheRefresher
synchroniseAll
in interface CacheRefresher
synchroniseAll
in class AbstractCacheRefresher<LDAPGroupWithAttributes>
directoryCache
- the DirectoryCache to update.OperationFailedException
- if there was an error processing the operationprotected PartialSynchronisationResult<? extends UserWithAttributes> synchroniseAllUsers(DirectoryCache directoryCache) throws OperationFailedException
AbstractCacheRefresher
AbstractCacheRefresher.synchroniseAll(DirectoryCache)
if the directory
allows that.synchroniseAllUsers
in class AbstractCacheRefresher<LDAPGroupWithAttributes>
directoryCache
- the cache which this method should updateOperationFailedException
protected PartialSynchronisationResult<LDAPGroupWithAttributes> synchroniseAllGroups(DirectoryCache directoryCache) throws OperationFailedException
AbstractCacheRefresher
AbstractCacheRefresher.synchroniseAll(DirectoryCache)
if the directory
allows that.synchroniseAllGroups
in class AbstractCacheRefresher<LDAPGroupWithAttributes>
directoryCache
- the cache which this method should updateOperationFailedException
protected Iterable<Membership> getMemberships(Collection<LDAPGroupWithAttributes> groupsToInclude, boolean isFullSync) throws OperationFailedException
getMemberships
in class AbstractCacheRefresher<LDAPGroupWithAttributes>
OperationFailedException
Copyright © 2021 Atlassian. All rights reserved.