public class ArchiveRepositoryPoller
extends java.lang.Object
ArchiveRepository for updates and publishes
them to a ScriptModuleLoader| Modifier and Type | Class and Description |
|---|---|
static class |
ArchiveRepositoryPoller.Builder |
protected static class |
ArchiveRepositoryPoller.RepositoryPollerContext
used for book-keeping of repositories that are being polled
|
| Modifier and Type | Field and Description |
|---|---|
protected ScriptModuleLoader |
moduleLoader |
protected java.util.concurrent.ScheduledExecutorService |
pollerThreadPool
Thread pool used by the pollers
|
protected java.util.concurrent.ConcurrentHashMap<ArchiveRepository,ArchiveRepositoryPoller.RepositoryPollerContext> |
repositoryContexts
Contains transient state required for calculating deltas
|
| Modifier | Constructor and Description |
|---|---|
protected |
ArchiveRepositoryPoller(java.util.concurrent.ScheduledExecutorService pollerThreadPool,
ScriptModuleLoader moduleLoader) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addRepository(ArchiveRepository archiveRepository,
int pollInterval,
java.util.concurrent.TimeUnit timeUnit,
boolean waitForInitialPoll)
Add a repository and schedule polling
|
protected void |
pollRepository(ArchiveRepository archiveRepository) |
void |
shutdown() |
protected final java.util.concurrent.ConcurrentHashMap<ArchiveRepository,ArchiveRepositoryPoller.RepositoryPollerContext> repositoryContexts
protected final java.util.concurrent.ScheduledExecutorService pollerThreadPool
protected final ScriptModuleLoader moduleLoader
protected ArchiveRepositoryPoller(java.util.concurrent.ScheduledExecutorService pollerThreadPool,
ScriptModuleLoader moduleLoader)
public boolean addRepository(ArchiveRepository archiveRepository, int pollInterval, java.util.concurrent.TimeUnit timeUnit, boolean waitForInitialPoll)
archiveRepository - repository to scanpollInterval - how often this repository should be scannedtimeUnit - unit of the pollInterval paramwaitForInitialPoll - whether or not to block until the initial poll is completeprotected void pollRepository(ArchiveRepository archiveRepository)
public void shutdown()