org.apache.lucene.store.jdbc.handler
Class MarkDeleteFileEntryHandler

java.lang.Object
  extended by org.apache.lucene.store.jdbc.handler.AbstractFileEntryHandler
      extended by org.apache.lucene.store.jdbc.handler.MarkDeleteFileEntryHandler
All Implemented Interfaces:
FileEntryHandler

public class MarkDeleteFileEntryHandler
extends AbstractFileEntryHandler

Does not delete entries from the database, just marks them for deletion by updating the deleted column to true.

To really delete file entries, use JdbcDirectory.deleteMarkDeleted() or JdbcDirectory.deleteMarkDeleted(long).

Author:
kimchy

Field Summary
 
Fields inherited from class org.apache.lucene.store.jdbc.handler.AbstractFileEntryHandler
jdbcDirectory, jdbcTemplate, table
 
Constructor Summary
MarkDeleteFileEntryHandler()
           
 
Method Summary
 void deleteFile(String name)
          Deletes the given file name.
 List deleteFiles(List names)
          Deletes a list of files.
 
Methods inherited from class org.apache.lucene.store.jdbc.handler.AbstractFileEntryHandler
close, configure, createOutput, fileExists, fileLength, fileModified, openInput, renameFile, touchFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkDeleteFileEntryHandler

public MarkDeleteFileEntryHandler()
Method Detail

deleteFile

public void deleteFile(String name)
                throws IOException
Description copied from interface: FileEntryHandler
Deletes the given file name.

Parameters:
name - The name of the file to delete
Throws:
IOException

deleteFiles

public List deleteFiles(List names)
                 throws IOException
Description copied from interface: FileEntryHandler
Deletes a list of files. It must be verified by the caller that all files correlate to this file entry handler.

Parameters:
names - The list of file names to delete
Returns:
List of files that were not deleted (or null if all were deleted)
Throws:
IOException


Copyright (c) 2004-2008 The Compass Project.