org.compass.needle.gigaspaces.store
Class GigaSpaceFileIndexOutput

java.lang.Object
  extended by org.apache.lucene.store.IndexOutput
      extended by org.apache.lucene.store.BufferedIndexOutput
          extended by org.compass.needle.gigaspaces.store.GigaSpaceFileIndexOutput

 class GigaSpaceFileIndexOutput
extends BufferedIndexOutput

Writes the output to a file and then when closed will flush it to the Space.

Not optimial, but allows for random seeking outside of just the first bucket. Not used since Lucene only seeks to the first buffer (with proper bucket size).

Author:
kimchy

Constructor Summary
GigaSpaceFileIndexOutput(GigaSpaceDirectory dir, String fileName)
           
 
Method Summary
 void close()
           
 void flushBuffer(byte[] b, int offset, int size)
          output methods:
 long length()
           
 void seek(long pos)
          Random-access methods
 
Methods inherited from class org.apache.lucene.store.BufferedIndexOutput
flush, getFilePointer, writeByte, writeBytes
 
Methods inherited from class org.apache.lucene.store.IndexOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeString, writeVInt, writeVLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GigaSpaceFileIndexOutput

public GigaSpaceFileIndexOutput(GigaSpaceDirectory dir,
                                String fileName)
                         throws IOException
Throws:
IOException
Method Detail

flushBuffer

public void flushBuffer(byte[] b,
                        int offset,
                        int size)
                 throws IOException
output methods:

Specified by:
flushBuffer in class BufferedIndexOutput
Throws:
IOException

close

public void close()
           throws IOException
Overrides:
close in class BufferedIndexOutput
Throws:
IOException

seek

public void seek(long pos)
          throws IOException
Random-access methods

Overrides:
seek in class BufferedIndexOutput
Throws:
IOException

length

public long length()
            throws IOException
Specified by:
length in class BufferedIndexOutput
Throws:
IOException


Copyright (c) 2004-2008 The Compass Project.