org.apache.solr.store.blockcache
Class CachedIndexOutput

java.lang.Object
  extended by org.apache.lucene.store.DataOutput
      extended by org.apache.lucene.store.IndexOutput
          extended by org.apache.solr.store.blockcache.ReusedBufferedIndexOutput
              extended by org.apache.solr.store.blockcache.CachedIndexOutput
All Implemented Interfaces:
Closeable

public class CachedIndexOutput
extends ReusedBufferedIndexOutput


Field Summary
 
Fields inherited from class org.apache.solr.store.blockcache.ReusedBufferedIndexOutput
buffer, BUFFER_SIZE
 
Constructor Summary
CachedIndexOutput(BlockDirectory directory, IndexOutput dest, int blockSize, String name, Cache cache, int bufferSize)
           
 
Method Summary
 void closeInternal()
           
 void flushInternal()
           
 void seekInternal(long pos)
           
 void writeInternal(byte[] b, int offset, int length)
          Expert: implements buffer flushing to cache.
 
Methods inherited from class org.apache.solr.store.blockcache.ReusedBufferedIndexOutput
clone, close, flush, getBufferStart, getFilePointer, length, seek, writeByte, writeBytes
 
Methods inherited from class org.apache.lucene.store.IndexOutput
setLength
 
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeInt, writeLong, writeShort, writeString, writeStringSet, writeStringStringMap, writeVInt, writeVLong
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedIndexOutput

public CachedIndexOutput(BlockDirectory directory,
                         IndexOutput dest,
                         int blockSize,
                         String name,
                         Cache cache,
                         int bufferSize)
Method Detail

flushInternal

public void flushInternal()
                   throws IOException
Specified by:
flushInternal in class ReusedBufferedIndexOutput
Throws:
IOException

closeInternal

public void closeInternal()
                   throws IOException
Specified by:
closeInternal in class ReusedBufferedIndexOutput
Throws:
IOException

seekInternal

public void seekInternal(long pos)
                  throws IOException
Specified by:
seekInternal in class ReusedBufferedIndexOutput
Throws:
IOException

writeInternal

public void writeInternal(byte[] b,
                          int offset,
                          int length)
                   throws IOException
Description copied from class: ReusedBufferedIndexOutput
Expert: implements buffer flushing to cache. Writes bytes to the current position in the output.

Specified by:
writeInternal in class ReusedBufferedIndexOutput
Parameters:
b - the array of bytes to write
offset - the offset in the array of bytes to write
length - the number of bytes to write
Throws:
IOException


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.