Class DbCachingDirectoryPoller

java.lang.Object
com.atlassian.crowd.directory.DbCachingDirectoryPoller
All Implemented Interfaces:
DirectoryMonitor, DirectoryPoller

public class DbCachingDirectoryPoller extends Object implements DirectoryPoller
A Directory poller for the DbCachingRemoteDirectory.
  • 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 the DirectoryPoller is discarded and a new one is created.
      Parameters:
      directorySynchroniser - DirectorySynchroniser
      remoteDirectory - RemoteDirectory
  • Method Details

    • getPollingInterval

      public static Duration getPollingInterval(RemoteDirectory remoteDirectory)
    • getPollingInterval

      public long getPollingInterval()
      Specified by:
      getPollingInterval in interface DirectoryPoller
      Returns:
      polling interval in seconds
    • pollChanges

      public void pollChanges(SynchronisationMode syncMode)
      Description copied from interface: DirectoryPoller
      Polls the directory for mutations and synchronises accordingly.
      Specified by:
      pollChanges in interface DirectoryPoller
      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 interface DirectoryMonitor
      Returns:
      directory ID.