@Override public void renameFile( String source, String dest ) throws IOException { delegate.renameFile( source, dest ); }
public void run() { try { dir.renameFile(from, to); } catch (IOException e) { logAsyncErrorMessage("rename from[" + from + "] to[" + to + "]"); } } });
@Override public void renameFile(String from, String to) throws IOException { dir.renameFile(from, to); }
@Override public void renameFile(String source, String dest) throws IOException { in.renameFile(source, dest); }
@Override public void renameFile(String source, String dest) throws IOException { in.renameFile(source, dest); }
public void renameFile(String from, String to) throws IOException { dir.renameFile(from, to); }
@Override public void renameFile(String source, String dest) throws IOException { in.renameFile(source, dest); synchronized (createdFileNames) { createdFileNames.add(dest); createdFileNames.remove(source); } }
@Override public void renameFile(String source, String dest) throws IOException { in.renameFile(source, dest); synchronized (createdFileNames) { createdFileNames.add(dest); createdFileNames.remove(source); } }
@Override public void renameFile(String from, String to) throws IOException { if (shouldPerformOperationOnActualDirectory(from)) { dir.renameFile(from, to); return; } fetchFileIfNotExists(from); localCacheDir.renameFile(from, to); dir.renameFile(from, to); }
@Override public void renameFile(String source, String dest) throws IOException { writeLock.ensureValid(); in.renameFile(source, dest); }
@Override public void renameFile(String source, String dest) throws IOException { // NOTE: uncache is unnecessary for lucene's usage, as we always sync() before renaming. unCache(source); in.renameFile(source, dest); }
@Override public void renameFile(String source, String dest) throws IOException { writeLock.ensureValid(); in.renameFile(source, dest); }
@Override public void renameFile(String source, String dest) throws IOException { // NOTE: uncache is unnecessary for lucene's usage, as we always sync() before renaming. unCache(source); in.renameFile(source, dest); }
public void renameFile(String from, String to) throws IOException { ramDir.renameFile(from, to); dir.renameFile(from, to); }
private final void writeDeleteableFiles(Vector files) throws IOException { OutputStream output = directory.createFile("deleteable.new"); try { output.writeInt(files.size()); for (int i = 0; i < files.size(); i++) output.writeString((String)files.elementAt(i)); } finally { output.close(); } directory.renameFile("deleteable.new", "deletable"); } }
@Override public void renameFile(String source, String dest) throws IOException { Directory sourceDir = getDirectory(source); // won't happen with standard lucene index files since pending and commit will // always have the same extension ("") if (sourceDir != getDirectory(dest)) { throw new AtomicMoveNotSupportedException(source, dest, "source and dest are in different directories"); } sourceDir.renameFile(source, dest); }
@Override public void renameFile(String source, String dest) throws IOException { Directory sourceDir = getDirectory(source); // won't happen with standard lucene index files since pending and commit will // always have the same extension ("") if (sourceDir != getDirectory(dest)) { throw new AtomicMoveNotSupportedException(source, dest, "source and dest are in different directories"); } sourceDir.renameFile(source, dest); }
@Override public void renameFile(String from, String to) throws IOException { editingContext().lock(); try { _wrapped.renameFile(from, to); } finally { editingContext().unlock(); } }
private void reWrite() throws IOException { // NOTE: norms are re-written in regular directory, not cfs OutputStream out = directory().createFile(segment + ".tmp"); try { out.writeBytes(bytes, maxDoc()); } finally { out.close(); } String fileName = segment + ".f" + number; directory().renameFile(segment + ".tmp", fileName); this.dirty = false; } }
public final void write(Directory directory) throws IOException { OutputStream output = directory.createFile("segments.new"); try { output.writeInt(FORMAT); // write FORMAT output.writeLong(++version); // every write changes the index output.writeInt(counter); // write counter output.writeInt(size()); // write infos for (int i = 0; i < size(); i++) { SegmentInfo si = info(i); output.writeString(si.name); output.writeInt(si.docCount); } } finally { output.close(); } // install new segment info directory.renameFile("segments.new", "segments"); }