Package com.atlassian.crowd.directory
Class DbCachingDirectoryPoller
java.lang.Object
com.atlassian.crowd.directory.DbCachingDirectoryPoller
- All Implemented Interfaces:
DirectoryMonitor
,DirectoryPoller
A Directory poller for the
DbCachingRemoteDirectory
.-
Field Summary
Fields inherited from interface com.atlassian.crowd.directory.monitor.poller.DirectoryPoller
DEFAULT_CACHE_SYNCHRONISE_INTERVAL
-
Constructor Summary
ConstructorDescriptionDbCachingDirectoryPoller
(DirectorySynchroniser directorySynchroniser, SynchronisableDirectory remoteDirectory) Constructs a new DbCachingDirectoryPoller with the correct instance of RemoteDirectory. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the ID of the directory that is being polled.long
static Duration
getPollingInterval
(RemoteDirectory remoteDirectory) void
pollChanges
(SynchronisationMode syncMode) Polls the directory for mutations and synchronises accordingly.
-
Constructor Details
-
DbCachingDirectoryPoller
public DbCachingDirectoryPoller(DirectorySynchroniser directorySynchroniser, SynchronisableDirectory remoteDirectory) Constructs a new DbCachingDirectoryPoller with the correct instance of RemoteDirectory. This is safe because if the RemoteDirectory is re-created theDirectoryPoller
is discarded and a new one is created.- Parameters:
directorySynchroniser
- DirectorySynchroniserremoteDirectory
- RemoteDirectory
-
-
Method Details
-
getPollingInterval
-
getPollingInterval
public long getPollingInterval()- Specified by:
getPollingInterval
in interfaceDirectoryPoller
- Returns:
- polling interval in seconds
-
pollChanges
Description copied from interface:DirectoryPoller
Polls the directory for mutations and synchronises accordingly.- Specified by:
pollChanges
in interfaceDirectoryPoller
- Parameters:
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.
-
getDirectoryID
public long getDirectoryID()Description copied from interface:DirectoryMonitor
Returns the ID of the directory that is being polled.- Specified by:
getDirectoryID
in interfaceDirectoryMonitor
- Returns:
- directory ID.
-