public class DynamicLocalResourceRepository extends StaticLocalResourceRepository
ResourceRepository
extends
StaticLocalResourceRepository
by adding a recurring task that sync
local files with remote Source
once a while. It makes sure that when
files in remote source are changed, the local copy gets the change
eventually.Modifier | Constructor and Description |
---|---|
protected |
DynamicLocalResourceRepository(File workingDir,
Source source) |
protected |
DynamicLocalResourceRepository(Source source) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getUpdateIntervalSeconds()
The default checking interval is
seconds.
|
void |
init()
This method should be called before instance can be used.
|
void |
setUpdateIntervalSeconds(int updateIntervalSeconds)
Setting the checking interval.
|
createTempDirectory, getResource, getSource, getWorkingDirectory
protected DynamicLocalResourceRepository(File workingDir, Source source)
protected DynamicLocalResourceRepository(Source source)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class StaticLocalResourceRepository
IOException
public int getUpdateIntervalSeconds()
public void init() throws Exception
StaticLocalResourceRepository
StaticLocalResourceRepository.workingDirectory
. It does it by calling
Source.initWorkingDirectory(File)
init
in class StaticLocalResourceRepository
Exception
- Allows any type of exceptionpublic void setUpdateIntervalSeconds(int updateIntervalSeconds)
updateIntervalSeconds
- New value of checking interval in seconsCopyright © 2009–2014. All rights reserved.