| java.lang.Object org.apache.lucene.index.IndexFileDeleter
IndexFileDeleter | final class IndexFileDeleter (Code) | | |
Method Summary | |
public void | checkpoint(SegmentInfos segmentInfos, boolean isCommit) For definition of "check point" see IndexWriter comments:
"Clarification: Check Points (and commits)".
Writer calls this when it has made a "consistent
change" to the index, meaning new files are written to
the index and the in-memory SegmentInfos have been
modified to point to those files.
This may or may not be a commit (segments_N may or may
not have been written).
We simply incref the files referenced by the new
SegmentInfos and decref the files we had previously
seen (if any).
If this is a commit, we also call the policy to give it
a chance to remove other commits. | public void | close() | void | decRef(List files) | void | decRef(SegmentInfos segmentInfos) | void | deleteFile(String fileName) | void | deleteFiles(List files) | void | deleteNewFiles(List files) Delets the specified files, but only if they are new
(have not yet been incref'd). | void | incRef(SegmentInfos segmentInfos, boolean isCommit) | void | incRef(List files) | public void | refresh(String segmentName) Writer calls this when it has hit an error and had to
roll back, to tell us that there may now be
unreferenced files in the filesystem. | public void | refresh() | void | setInfoStream(PrintStream infoStream) |
VERBOSE_REF_COUNTS | public static boolean VERBOSE_REF_COUNTS(Code) | | Change to true to see details of reference counts when
infoStream != null
|
checkpoint | public void checkpoint(SegmentInfos segmentInfos, boolean isCommit) throws IOException(Code) | | For definition of "check point" see IndexWriter comments:
"Clarification: Check Points (and commits)".
Writer calls this when it has made a "consistent
change" to the index, meaning new files are written to
the index and the in-memory SegmentInfos have been
modified to point to those files.
This may or may not be a commit (segments_N may or may
not have been written).
We simply incref the files referenced by the new
SegmentInfos and decref the files we had previously
seen (if any).
If this is a commit, we also call the policy to give it
a chance to remove other commits. If any commits are
removed, we decref their files as well.
|
deleteNewFiles | void deleteNewFiles(List files) throws IOException(Code) | | Delets the specified files, but only if they are new
(have not yet been incref'd).
|
refresh | public void refresh(String segmentName) throws IOException(Code) | | Writer calls this when it has hit an error and had to
roll back, to tell us that there may now be
unreferenced files in the filesystem. So we re-list
the filesystem and delete such files. If segmentName
is non-null, we will only delete files corresponding to
that segment.
|
|
|