Index: lucene/src/test/org/apache/lucene/index/TestFieldsReader.java =================================================================== --- lucene/src/test/org/apache/lucene/index/TestFieldsReader.java (revision 1103792) +++ lucene/src/test/org/apache/lucene/index/TestFieldsReader.java (working copy) @@ -411,10 +411,6 @@ return fsDir.fileModified(name); } @Override - public void touchFile(String name) throws IOException { - fsDir.touchFile(name); - } - @Override public void deleteFile(String name) throws IOException { fsDir.deleteFile(name); } Index: lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java =================================================================== --- lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java (revision 1103792) +++ lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java (working copy) @@ -345,12 +345,6 @@ dir.deleteFile(name); } @Override - public void touchFile(String name) - throws IOException - { - dir.touchFile(name); - } - @Override public long fileModified(String name) throws IOException { Index: lucene/src/java/org/apache/lucene/index/CompoundFileReader.java =================================================================== --- lucene/src/java/org/apache/lucene/index/CompoundFileReader.java (revision 1103792) +++ lucene/src/java/org/apache/lucene/index/CompoundFileReader.java (working copy) @@ -189,12 +189,6 @@ return directory.fileModified(fileName); } - /** Set the modified time of the compound file to now. */ - @Override - public void touchFile(String name) throws IOException { - directory.touchFile(fileName); - } - /** Not implemented * @throws UnsupportedOperationException */ @Override Index: lucene/src/java/org/apache/lucene/store/RAMFile.java =================================================================== --- lucene/src/java/org/apache/lucene/store/RAMFile.java (revision 1103792) +++ lucene/src/java/org/apache/lucene/store/RAMFile.java (working copy) @@ -26,7 +26,6 @@ RAMDirectory directory; protected long sizeInBytes; - // This is publicly modifiable via Directory.touchFile(), so direct access not supported private long lastModified = System.currentTimeMillis(); // File used as buffer, in no RAMDirectory Index: lucene/src/java/org/apache/lucene/store/Directory.java =================================================================== --- lucene/src/java/org/apache/lucene/store/Directory.java (revision 1103792) +++ lucene/src/java/org/apache/lucene/store/Directory.java (working copy) @@ -65,10 +65,6 @@ public abstract long fileModified(String name) throws IOException; - /** Set the modified time of an existing file to now. */ - public abstract void touchFile(String name) - throws IOException; - /** Removes an existing file in the directory. */ public abstract void deleteFile(String name) throws IOException; Index: lucene/src/java/org/apache/lucene/store/RAMDirectory.java =================================================================== --- lucene/src/java/org/apache/lucene/store/RAMDirectory.java (revision 1103792) +++ lucene/src/java/org/apache/lucene/store/RAMDirectory.java (working copy) @@ -27,8 +27,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; -import org.apache.lucene.util.ThreadInterruptedException; - /** * A memory-resident {@link Directory} implementation. Locking * implementation is by default the {@link SingleInstanceLockFactory} @@ -112,30 +110,6 @@ return file.getLastModified(); } - /** Set the modified time of an existing file to now. - * @throws IOException if the file does not exist - */ - @Override - public void touchFile(String name) throws IOException { - ensureOpen(); - RAMFile file = fileMap.get(name); - if (file == null) { - throw new FileNotFoundException(name); - } - - long ts2, ts1 = System.currentTimeMillis(); - do { - try { - Thread.sleep(0, 1); - } catch (InterruptedException ie) { - throw new ThreadInterruptedException(ie); - } - ts2 = System.currentTimeMillis(); - } while(ts1 == ts2); - - file.setLastModified(ts2); - } - /** Returns the length in bytes of a file in the directory. * @throws IOException if the file does not exist */ Index: lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java =================================================================== --- lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java (revision 1103792) +++ lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java (working copy) @@ -115,11 +115,6 @@ } @Override - public void touchFile(String name) throws IOException { - getDirectory(name).touchFile(name); - } - - @Override public void deleteFile(String name) throws IOException { getDirectory(name).deleteFile(name); } Index: lucene/src/java/org/apache/lucene/store/FSDirectory.java =================================================================== --- lucene/src/java/org/apache/lucene/store/FSDirectory.java (revision 1103792) +++ lucene/src/java/org/apache/lucene/store/FSDirectory.java (working copy) @@ -272,14 +272,6 @@ return file.lastModified(); } - /** Set the modified time of an existing file to now. */ - @Override - public void touchFile(String name) { - ensureOpen(); - File file = new File(directory, name); - file.setLastModified(System.currentTimeMillis()); - } - /** Returns the length in bytes of a file in the directory. */ @Override public long fileLength(String name) throws IOException { Index: lucene/src/test-framework/org/apache/lucene/store/MockDirectoryWrapper.java =================================================================== --- lucene/src/test-framework/org/apache/lucene/store/MockDirectoryWrapper.java (revision 1103792) +++ lucene/src/test-framework/org/apache/lucene/store/MockDirectoryWrapper.java (working copy) @@ -560,12 +560,6 @@ } @Override - public synchronized void touchFile(String name) throws IOException { - maybeYield(); - delegate.touchFile(name); - } - - @Override public synchronized long fileLength(String name) throws IOException { maybeYield(); return delegate.fileLength(name); Index: lucene/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEDirectory.java =================================================================== --- lucene/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEDirectory.java (revision 1103792) +++ lucene/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEDirectory.java (working copy) @@ -199,17 +199,6 @@ return new JELock(); } - @Override - public void touchFile(String name) throws IOException { - File file = new File(name); - long length = 0L; - - if (file.exists(this)) - length = file.getLength(); - - file.modify(this, length, System.currentTimeMillis()); - } - /** * Once a transaction handle was committed it is no longer valid. In order * to continue using this JEDirectory instance after a commit, the Index: lucene/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbDirectory.java =================================================================== --- lucene/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbDirectory.java (revision 1103792) +++ lucene/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbDirectory.java (working copy) @@ -222,19 +222,6 @@ return new DbLock(); } - @Override - public void touchFile(String name) - throws IOException - { - File file = new File(name); - long length = 0L; - - if (file.exists(this)) - length = file.getLength(); - - file.modify(this, length, System.currentTimeMillis()); - } - /** * Once a transaction handle was committed it is no longer valid. In * order to continue using this DbDirectory instance after a commit, the