Michael Busch wrote on 17/May/2007: > public static class ExtendedFSDirectory extends FSDirectory { > ... > public void flushBuffer(byte[] b, int offset, int size) > throws IOException { > if (ExtendedFSDirectory.this.interrupted) { > throw new IndexWriterInterruptException(); > } > > super.flushBuffer(b, offset, size); > } >
Steven Parkes wrote on 22/may/2007: > I think something like what Michael has suggested is a good > idea, but I would be in favor of putting it in the core, > rather than making it a derived thing for a single Directory > implementation. Seems to me like it's a pretty small code > change for a very nice thing to have. Doesn't seem to add > much complexity. I was thinking of how this can be made a "core logic". If we regard the "shutdown()" op/status as system wide, ie static, perhaps the shutdown feature can be supported only for implementations of BufferedIndexOutput? If so, would it work to check for a shutdown request in two locations only: BufferedIndexOutput.writeBytes(byte[],int,int) BufferedIndexOutput.flush() Doron --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]