@Override public IndexOutput createOutput(String name, IOContext context) throws IOException { if (VERBOSE) { System.out.println("nrtdir.createOutput name=" + name); } if (doCacheWrite(name, context)) { if (VERBOSE) { System.out.println(" to cache"); } return cache.createOutput(name, context); } else { return in.createOutput(name, context); } }
public SortedTermPositions(TermPositions original, int[] oldToNew) { this.original = original; this.oldToNew = oldToNew; try { out = (RAMOutputStream)tempDir.createOutput(TEMP_FILE); } catch (IOException ioe) { LOG.warning("Error creating temporary output: " + ioe); } }
public IndexOutput createOutput(String name) throws IOException { return new AsyncMemoryMirrorIndexOutput(name, (RAMOutputStream) ramDir.createOutput(name)); }
public IndexOutput createOutput(String name) throws IOException { return new SyncMemoryMirrorIndexOutput(dir.createOutput(name), (RAMOutputStream) ramDir.createOutput(name)); }
@Override public IndexOutput createOutput(String name, IOContext context) throws IOException { if (VERBOSE) { System.out.println("nrtdir.createOutput name=" + name); } if (doCacheWrite(name, context)) { if (VERBOSE) { System.out.println(" to cache"); } return cache.createOutput(name, context); } else { return in.createOutput(name, context); } }
@Override public IndexOutput createOutput(String name, IOContext context) throws IOException { IndexOutput indexOutput = super.createOutput( name, context ); IndexOutputDelegate tracked = new IndexOutputDelegate( indexOutput ); openOutputs.put( tracked, tracked ); return tracked; }
@Override public IndexOutput createOutput(String name, IOContext context) throws IOException { if (VERBOSE) { System.out.println("nrtdir.createOutput name=" + name); } if (doCacheWrite(name, context)) { if (VERBOSE) { System.out.println(" to cache"); } try { in.deleteFile(name); } catch (IOException ioe) { // This is fine: file may not exist } return cache.createOutput(name, context); } else { try { cache.deleteFile(name); } catch (IOException ioe) { // This is fine: file may not exist } return in.createOutput(name, context); } }
@Override public IndexOutput createOutput(String name, IOContext context) throws IOException { if (VERBOSE) { System.out.println("nrtdir.createOutput name=" + name); } if (doCacheWrite(name, context)) { if (VERBOSE) { System.out.println(" to cache"); } try { in.deleteFile(name); } catch (IOException ioe) { // This is fine: file may not exist } return cache.createOutput(name, context); } else { try { cache.deleteFile(name); } catch (IOException ioe) { // This is fine: file may not exist } return in.createOutput(name, context); } }