com.atlassian.crowd.directory.ldap.cache
Class UsnChangedCacheRefresher
java.lang.Object
com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher
com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher
- All Implemented Interfaces:
- CacheRefresher
public class UsnChangedCacheRefresher
- extends AbstractCacheRefresher
- implements CacheRefresher
Retrieves latest changes from MS Active Directory in order to allow "delta" cache refreshes.
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).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UsnChangedCacheRefresher
public UsnChangedCacheRefresher(MicrosoftActiveDirectory activeDirectory)
synchroniseMembershipsForGroup
protected void synchroniseMembershipsForGroup(GroupType groupType,
Group group,
DirectoryCache directoryCache)
throws OperationFailedException
- Overrides:
synchroniseMembershipsForGroup in class AbstractCacheRefresher
- Throws:
OperationFailedException
synchroniseChanges
public boolean synchroniseChanges(DirectoryCache directoryCache)
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.
- Specified by:
synchroniseChanges in interface CacheRefresher
- Parameters:
directoryCache - the DirectoryCache to update.
- Returns:
- true if changes were synchronised
- Throws:
OperationFailedException - if there was an error processing the operation
synchroniseAll
public void 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 interface CacheRefresher- Overrides:
synchroniseAll in class AbstractCacheRefresher
- Parameters:
directoryCache - the DirectoryCache to update.
- Throws:
OperationFailedException - if there was an error processing the operation
synchroniseAllUsers
protected void synchroniseAllUsers(DirectoryCache directoryCache)
throws OperationFailedException
- Specified by:
synchroniseAllUsers in class AbstractCacheRefresher
- Throws:
OperationFailedException
synchroniseAllGroups
protected java.util.List<? extends Group> synchroniseAllGroups(GroupType groupType,
DirectoryCache directoryCache)
throws OperationFailedException
- Specified by:
synchroniseAllGroups in class AbstractCacheRefresher
- Throws:
OperationFailedException
Copyright © 2012 Atlassian. All Rights Reserved.