public class ChangedList extends Object
Modifier and Type | Method and Description |
---|---|
protected void |
addChangedFile(ChangedFile changedFile) |
void |
addChangedFile(File changedFile)
Adds a changed file to the list of items to be processed.
|
void |
addListener(ChangedListListener listener) |
void |
clear()
Removes all files from the changed list.
|
protected void |
fireChangedEvent() |
protected void |
fireChangedEventAsync() |
static ChangedList |
getInstance() |
int |
getListSize()
Gets the current size of the changed list
|
int |
getListSizeIncludingReservedFiles()
Gets the current size of the changed list included the files that have been reserved
|
long |
getVersion() |
List<File> |
peek(int maxFiles) |
long |
persist(File persistFile)
Writes out the current state of the ChangeList to the given file.
|
void |
removeListener(ChangedListListener listener) |
ChangedFile |
reserve()
Retrieves a changed file for processing and removes it from the list of unreserved
files.
|
void |
restore(File persistFile,
List<File> contentDirs)
Restores the state of the ChangedList using the given backup file
|
public static ChangedList getInstance()
public void addChangedFile(File changedFile)
changedFile
- a file which has changed on the file systempublic int getListSize()
public int getListSizeIncludingReservedFiles()
protected void addChangedFile(ChangedFile changedFile)
protected void fireChangedEvent()
protected void fireChangedEventAsync()
public void addListener(ChangedListListener listener)
public void removeListener(ChangedListListener listener)
public void clear()
public ChangedFile reserve()
public long getVersion()
public long persist(File persistFile)
persistFile
- file to write state topublic void restore(File persistFile, List<File> contentDirs)
persistFile
- file containing previous statecontentDirs
- content directories currently configured.Copyright © 2009–2015 DuraSpace. All rights reserved.