com.atlassian.crowd.directory
Class DbCachingDirectoryPoller

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

public class DbCachingDirectoryPoller
extends Object
implements 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
DbCachingDirectoryPoller(DirectorySynchroniser directorySynchroniser, SynchronisableDirectory remoteDirectory)
          Constructs a new DbCachingDirectoryPoller with the correct instance of RemoteDirectory.
 
Method Summary
 long getDirectoryID()
          Returns the ID of the directory that is being polled.
 long getPollingInterval()
           
 void pollChanges(SynchronisationMode syncMode)
          Polls the directory for mutations and synchronises accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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.


Copyright © 2012 Atlassian. All Rights Reserved.