List of usage examples for org.apache.lucene.store IndexOutput toString
@Override
public String toString()
From source file:org.elasticsearch.index.store.ByteSizeCachingDirectory.java
License:Apache License
private IndexOutput wrapIndexOutput(IndexOutput out) { synchronized (this) { numOpenOutputs++;//from w w w .ja va 2 s . com } return new FilterIndexOutput(out.toString(), out) { @Override public void writeBytes(byte[] b, int length) throws IOException { // Don't write to atomicXXX here since it might be called in // tight loops and memory barriers are costly super.writeBytes(b, length); } @Override public void writeByte(byte b) throws IOException { // Don't write to atomicXXX here since it might be called in // tight loops and memory barriers are costly super.writeByte(b); } @Override public void close() throws IOException { // Close might cause some data to be flushed from in-memory buffers, so // increment the modification counter too. try { super.close(); } finally { synchronized (this) { numOpenOutputs--; modCount++; } } } }; }
From source file:org.elasticsearch.index.store.VerifyingIndexOutput.java
License:Apache License
/** Sole constructor */ VerifyingIndexOutput(IndexOutput out) { super("VerifyingIndexOutput(out=" + out.toString() + ")", out); }