org.apache.lucene.store
Class DirectoryTemplate
java.lang.Object
org.apache.lucene.store.DirectoryTemplate
public class DirectoryTemplate
- extends Object
A simple directory template for performing operations that result in actions being performed on the
directory (like index reader/searcher/writer operation). Helps in having the same code base when working
with different implementation of Lucene Directory, or switching between un-managed and managed
transactions with JdbcDirectory.
Will work with any type of Directory implementation. Special actions will be taken if the
JdbcDirectory is used, where DataSourceUtils.commitConnectionIfPossible(java.sql.Connection) will
be called after the callback method.
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryTemplate
public DirectoryTemplate(Directory dir)
execute
public void execute(DirectoryTemplate.DirectoryCallback callback)
throws IOException
- Throws:
IOException
Copyright (c) 2004-2008 The Compass Project.