com.norconex.committer.impl
Class FileSystemCommitter
java.lang.Object
com.norconex.committer.impl.FileSystemCommitter
- All Implemented Interfaces:
- ICommitter, IXMLConfigurable, Serializable
public class FileSystemCommitter
- extends Object
- implements ICommitter, IXMLConfigurable
Commits a copy of files on the filesystem. Mostly useful for
troubleshooting.
XML configuration usage:
<committer class="com.norconex.committer.FileSystemCommitter">
<directory>(path where to save files)</directory>
</committer>
- Author:
- Pascal Essiembre
- See Also:
- Serialized Form
DEFAULT_DIRECTORY
public static final String DEFAULT_DIRECTORY
- See Also:
- Constant Field Values
FileSystemCommitter
public FileSystemCommitter()
getDirectory
public String getDirectory()
setDirectory
public void setDirectory(String directory)
queueAdd
public void queueAdd(String reference,
File document,
Properties metadata)
- Description copied from interface:
ICommitter
- Queues a new or modified document. These queued documents should
be sent to their target destination when commit is called.
- Specified by:
queueAdd
in interface ICommitter
- Parameters:
reference
- document reference (e.g. URL)document
- text documentmetadata
- document metadata
queueRemove
public void queueRemove(String reference,
File document,
Properties metadata)
- Description copied from interface:
ICommitter
- Queues a document for removal. These queued documents should
be sent to their target destination for deletion when commit is called.
- Specified by:
queueRemove
in interface ICommitter
- Parameters:
reference
- document reference (e.g. URL)document
- text documentmetadata
- document metadata
commit
public void commit()
- Description copied from interface:
ICommitter
- Commits queued documents. Effectively apply the additions and removals.
- Specified by:
commit
in interface ICommitter
getAddDir
public File getAddDir()
getRemoveDir
public File getRemoveDir()
loadFromXML
public void loadFromXML(Reader in)
- Specified by:
loadFromXML
in interface IXMLConfigurable
saveToXML
public void saveToXML(Writer out)
throws IOException
- Specified by:
saveToXML
in interface IXMLConfigurable
- Throws:
IOException
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2013 Norconex Inc.. All Rights Reserved.