public class UsnChangedCacheRefresher extends AbstractCacheRefresher 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 |
static com.google.common.base.Function<Tombstone,String> |
TOMBSTONE_TO_GUID_FUNCTION |
remoteDirectory| Constructor and Description |
|---|
UsnChangedCacheRefresher(MicrosoftActiveDirectory activeDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
synchroniseAll(DirectoryCache directoryCache)
Will visit all Users and Groups in the external directory in order to do a Full refresh.
|
protected List<? extends GroupWithAttributes> |
synchroniseAllGroups(DirectoryCache directoryCache) |
protected List<? extends UserWithAttributes> |
synchroniseAllUsers(DirectoryCache directoryCache,
boolean withAttributes) |
boolean |
synchroniseChanges(DirectoryCache directoryCache)
Attempts to synchronise changes since the last refresh as opposed to performing a full synchronisation.
|
directoryDescription, isIncrementalSyncEnabled, isUserAttributeSynchronisationEnabled, synchroniseAllGroupAttributes, synchroniseAllUserAttributes, synchroniseMembershipspublic static final com.google.common.base.Function<Tombstone,String> TOMBSTONE_TO_GUID_FUNCTION
public static final String PROPERTY_USE_LEGACY_AD_INCREMENTAL_SYNC
public UsnChangedCacheRefresher(MicrosoftActiveDirectory activeDirectory)
public boolean synchroniseChanges(DirectoryCache directoryCache) throws OperationFailedException
CacheRefreshersynchroniseChanges in interface CacheRefresherdirectoryCache - the DirectoryCache to update.OperationFailedException - if there was an error processing the operationpublic void synchroniseAll(DirectoryCache directoryCache) throws OperationFailedException
CacheRefreshersynchroniseAll in interface CacheRefreshersynchroniseAll in class AbstractCacheRefresherdirectoryCache - the DirectoryCache to update.OperationFailedException - if there was an error processing the operationprotected List<? extends UserWithAttributes> synchroniseAllUsers(DirectoryCache directoryCache, boolean withAttributes) throws OperationFailedException
synchroniseAllUsers in class AbstractCacheRefresherOperationFailedExceptionprotected List<? extends GroupWithAttributes> synchroniseAllGroups(DirectoryCache directoryCache) throws OperationFailedException
synchroniseAllGroups in class AbstractCacheRefresherOperationFailedExceptionCopyright © 2018 Atlassian. All rights reserved.