Package jetbrains.buildServer.users.sync
Class SynchronizerManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.users.sync.SynchronizerManagerImpl
-
- All Implemented Interfaces:
ActiveSynchronizersProvider,SynchronizerManager
public class SynchronizerManagerImpl extends Object implements SynchronizerManager, ActiveSynchronizersProvider
- Since:
- 8.0
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description SynchronizerManagerImpl(UserModel userModel, UserGroupManager userGroupManager, ExecutorServices executorServices, ServerResponsibility serverResponsibility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SynchronizercreateOrUpdateSynchronizer(SynchronizerInfo info, RemoteDataFetcher fetcher, SynchronizerOptions options, SynchronizerStatistics statistics, UserRemoteIdProvider userRemoteIdProvider, UserGroupRemoteIdProvider userGroupRemoteIdProvider, Logger logger)Creates (or updates if already exists) a synchronizer.voidinit()booleanisActive(String name)Returns whether synchronizer denoted bynameis an active one.voidremoveSynchronizer(Synchronizer synchronizer)Removes the synchronizer if it is present in the manager.voidscheduleUserSynchronization(SUser user)Adds a request to the alarm (for the given user synchronization).
-
-
-
Constructor Detail
-
SynchronizerManagerImpl
public SynchronizerManagerImpl(@NotNull UserModel userModel, @NotNull UserGroupManager userGroupManager, @NotNull ExecutorServices executorServices, @NotNull ServerResponsibility serverResponsibility)
-
-
Method Detail
-
init
public void init()
-
createOrUpdateSynchronizer
@NotNull public Synchronizer createOrUpdateSynchronizer(@NotNull SynchronizerInfo info, @NotNull RemoteDataFetcher fetcher, @NotNull SynchronizerOptions options, @NotNull SynchronizerStatistics statistics, @Nullable UserRemoteIdProvider userRemoteIdProvider, @Nullable UserGroupRemoteIdProvider userGroupRemoteIdProvider, @NotNull Logger logger)
Description copied from interface:SynchronizerManagerCreates (or updates if already exists) a synchronizer.Update means that the new synchronizer with provided parameters (
info,fetcher,options,statistics,logger) will replace the existing one with the same name (seeSynchronizerInfo.getOwnerName()).- Specified by:
createOrUpdateSynchronizerin interfaceSynchronizerManager- Parameters:
info- a synchronizer infofetcher- a remote data fetcheroptions- synchronizer optionsstatistics- synchronizer statisticsuserRemoteIdProvider- user remote id provider; if null, then users are matched by usernamelogger- a logger- Returns:
- a synchronizer
-
removeSynchronizer
public void removeSynchronizer(@NotNull Synchronizer synchronizer)Description copied from interface:SynchronizerManagerRemoves the synchronizer if it is present in the manager.- Specified by:
removeSynchronizerin interfaceSynchronizerManager- Parameters:
synchronizer- the synchronizer to remove
-
isActive
public boolean isActive(@NotNull String name)Description copied from interface:ActiveSynchronizersProviderReturns whether synchronizer denoted bynameis an active one.- Specified by:
isActivein interfaceActiveSynchronizersProvider- Parameters:
name- synchronizer name- Returns:
- true if synchronizer is active
-
scheduleUserSynchronization
public void scheduleUserSynchronization(@NotNull SUser user)Adds a request to the alarm (for the given user synchronization).- Parameters:
user- the user to sync
-
-