com.sleepycat.je.log
Class FileHandle

java.lang.Object
  extended by com.sleepycat.je.log.FileHandle

 class FileHandle
extends java.lang.Object

A FileHandle embodies a File and its accompanying latch.


Constructor Summary
FileHandle(long fileNum, java.lang.String label)
          Creates a new handle but does not initialize it.
 
Method Summary
(package private)  void close()
           
(package private)  java.io.RandomAccessFile getFile()
           
(package private)  long getFileNum()
           
(package private)  int getLogVersion()
           
(package private)  void init(java.io.RandomAccessFile file, int logVersion)
          Initializes the handle after opening the file and reading the header.
(package private)  boolean isOldHeaderVersion()
           
(package private)  void latch()
           
(package private)  boolean latchNoWait()
           
(package private)  void release()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHandle

FileHandle(long fileNum,
           java.lang.String label)
Creates a new handle but does not initialize it. The init method must be called before using the handle to access the file.

Method Detail

init

void init(java.io.RandomAccessFile file,
          int logVersion)
Initializes the handle after opening the file and reading the header.


getFile

java.io.RandomAccessFile getFile()

getFileNum

long getFileNum()

getLogVersion

int getLogVersion()

isOldHeaderVersion

boolean isOldHeaderVersion()

latch

void latch()
     throws DatabaseException
Throws:
DatabaseException

latchNoWait

boolean latchNoWait()
              throws DatabaseException
Throws:
DatabaseException

release

void release()
       throws DatabaseException
Throws:
DatabaseException

close

void close()
     throws java.io.IOException
Throws:
java.io.IOException


Copyright (c) 2004,2008 Oracle. All rights reserved.