|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.fascinator.harvester.filesystem.DerbyCache
public class DerbyCache
This class is designed to encapsulate all logic required to run a cache backed into a derby database in support of the file system harvester. There are two caches available.
Some form of caching must be enabled to support deletion detection for this plugin.
| Constructor Summary | |
|---|---|
DerbyCache(JsonSimpleConfig config)
|
|
| Method Summary | |
|---|---|
Set<String> |
getUnsetFlags()
Used to support deletion detection. |
boolean |
hasChanged(String oid,
File file)
Check whether or not the file has changed according to the configured cache. |
void |
purgeUnsetFlags()
Used to support deletion detection. |
void |
resetFlags()
Used to support deletion detection. |
void |
shutdown()
Shutdown the database connections and cleanup. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DerbyCache(JsonSimpleConfig config)
throws Exception
Exception| Method Detail |
|---|
public boolean hasChanged(String oid,
File file)
Check whether or not the file has changed according to the configured cache. The response from this method should be used as an indicator on whether or not to proceed with harvesting the file. In that context:
file - : The file to test.
public void resetFlags()
Used to support deletion detection. Should be called at the beginning of a harvest to reset the flags in the database.
public Set<String> getUnsetFlags()
Used to support deletion detection. This method is called after the harvest, and will return a list of all file paths
public void purgeUnsetFlags()
Used to support deletion detection. This method is just for cleanup after the process completes.
public void shutdown()
throws Exception
Exception - if there are errors
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||