com.sleepycat.je.log
Class FileHandleSource

java.lang.Object
  extended bycom.sleepycat.je.log.FileSource
      extended bycom.sleepycat.je.log.FileHandleSource
All Implemented Interfaces:
LogSource

class FileHandleSource
extends FileSource

FileHandleSource is a file source built on top of a cached file handle.


Constructor Summary
(package private) FileHandleSource(FileHandle fileHandle, int readBufferSize, FileManager fileManager)
           
 
Method Summary
 ByteBuffer getBytes(long fileOffset)
          Fill the destination byte array with bytes.
 ByteBuffer getBytes(long fileOffset, int numBytes)
          Fill the destination byte array with the requested number of bytes.
 void release()
          We're done with this log source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHandleSource

FileHandleSource(FileHandle fileHandle,
                 int readBufferSize,
                 FileManager fileManager)
Method Detail

release

public void release()
             throws DatabaseException
Description copied from interface: LogSource
We're done with this log source.

Specified by:
release in interface LogSource
Overrides:
release in class FileSource
Throws:
DatabaseException
See Also:
LogSource.release()

getBytes

public ByteBuffer getBytes(long fileOffset)
                    throws IOException
Description copied from interface: LogSource
Fill the destination byte array with bytes. The offset indicates the absolute log file position.

Specified by:
getBytes in interface LogSource
Throws:
IOException
See Also:
LogSource.getBytes(long)

getBytes

public ByteBuffer getBytes(long fileOffset,
                           int numBytes)
                    throws IOException
Description copied from interface: LogSource
Fill the destination byte array with the requested number of bytes. The offset indicates the absolute position in the log file.

Specified by:
getBytes in interface LogSource
Throws:
IOException
See Also:
LogSource.getBytes(long)


Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.