Package org.apache.solr.blockcache
Class ReusedBufferedIndexOutput
java.lang.Object
org.apache.lucene.store.DataOutput
org.apache.lucene.store.IndexOutput
org.apache.solr.blockcache.ReusedBufferedIndexOutput
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
CachedIndexOutput
public abstract class ReusedBufferedIndexOutput
extends org.apache.lucene.store.IndexOutput
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReusedBufferedIndexOutput(String resourceDescription, String name) ReusedBufferedIndexOutput(String resourceDescription, String name, int bufferSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract voidprotected voidWrite the buffered bytes to cacheprotected longlongvoidwriteByte(byte b) voidwriteBytes(byte[] b, int offset, int length) protected abstract voidwriteInternal(byte[] b, int offset, int length) Expert: implements buffer flushing to cache.Methods inherited from class org.apache.lucene.store.IndexOutput
alignFilePointer, alignOffset, getChecksum, getName, toStringMethods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeGroupVInts, writeGroupVInts, writeInt, writeLong, writeMapOfStrings, writeSetOfStrings, writeShort, writeString, writeVInt, writeVLong, writeZInt, writeZLong
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZE- See Also:
-
buffer
protected byte[] buffer
-
-
Constructor Details
-
ReusedBufferedIndexOutput
-
ReusedBufferedIndexOutput
-
-
Method Details
-
getBufferStart
protected long getBufferStart() -
flushBufferToCache
Write the buffered bytes to cache- Throws:
IOException
-
closeInternal
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.lucene.store.IndexOutput- Throws:
IOException
-
getFilePointer
public long getFilePointer()- Specified by:
getFilePointerin classorg.apache.lucene.store.IndexOutput
-
writeByte
- Specified by:
writeBytein classorg.apache.lucene.store.DataOutput- Throws:
IOException
-
writeInternal
Expert: implements buffer flushing to cache. Writes bytes to the current position in the output.- Parameters:
b- the array of bytes to writeoffset- the offset in the array of bytes to writelength- the number of bytes to write- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin classorg.apache.lucene.store.DataOutput- Throws:
IOException
-