com.sleepycat.je.log
Class FileSource

java.lang.Object
  extended by com.sleepycat.je.log.FileSource
All Implemented Interfaces:
LogSource
Direct Known Subclasses:
FileHandleSource

 class FileSource
extends Object
implements LogSource

FileSource is used as a channel to a log file when faulting in objects from the log.


Constructor Summary
FileSource(RandomAccessFile file, 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

FileSource

FileSource(RandomAccessFile file,
           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
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.