public class AtlassianSchedulerDirectoryPollerManager extends Object implements DirectoryPollerManager
| Constructor and Description |
|---|
AtlassianSchedulerDirectoryPollerManager(com.atlassian.scheduler.SchedulerService schedulerService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPoller(DirectoryPoller poller)
Adds a configured DirectoryPoller to the scheduler.
|
protected long |
getStartDelay() |
boolean |
hasPoller(long directoryID)
Checks whether a DirectoryPoller is scheduled to
poll a given directory.
|
void |
removeAllPollers()
Attempts to unregister all registered pollers.
|
boolean |
removePoller(long directoryID)
Removes the DirectoryPoller from the scheduler if
one exists for the given directory.
|
void |
triggerPoll(long directoryID,
SynchronisationMode syncMode)
Manually triggers the directory poller to immediately poll the directory and synchronise changes.
|
public AtlassianSchedulerDirectoryPollerManager(com.atlassian.scheduler.SchedulerService schedulerService)
public void addPoller(DirectoryPoller poller) throws DirectoryMonitorRegistrationException
DirectoryPollerManageraddPoller in interface DirectoryPollerManagerpoller - configured DirectoryPoller.DirectoryMonitorRegistrationException - error registering poller with scheduler.public boolean hasPoller(long directoryID)
DirectoryPollerManagerhasPoller in interface DirectoryPollerManagerdirectoryID - directory ID.true if and only if a poller has been scheduled.public void triggerPoll(long directoryID,
SynchronisationMode syncMode)
DirectoryPollerManagerDirectoryManager.isSynchronising(long).
If the directory does not exist or has no poller associated with it, this method
will do nothing. You can check if a directory has a poller associated with it by calling
DirectoryPollerManager.hasPoller(long).triggerPoll in interface DirectoryPollerManagerdirectoryID - directory ID.syncMode - determines whether the poll only requests elements that have changed since a timestamp or if
it queries for the entire user base from the remote directory and determines changes locally.public boolean removePoller(long directoryID)
throws DirectoryMonitorUnregistrationException
DirectoryPollerManagerremovePoller in interface DirectoryPollerManagerdirectoryID - directory ID.true if and only if a poller existed
and was removed from polling the given directory.DirectoryMonitorUnregistrationException - If an error occurs during remove.public void removeAllPollers()
DirectoryPollerManagerremoveAllPollers in interface DirectoryPollerManagerprotected long getStartDelay()
Copyright © 2018 Atlassian. All rights reserved.