com.sleepycat.je.log
Class FileHandle

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

public class FileHandle
extends Object

A FileHandle embodies a File and its accompanying latch.


Constructor Summary
FileHandle(long fileNum, String label)
          Creates a new handle but does not initialize it.
 
Method Summary
(package private)  void close()
           
 RandomAccessFile getFile()
           
(package private)  long getFileNum()
           
 int getLogVersion()
           
(package private)  void init(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()
           
 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,
           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(RandomAccessFile file,
          int logVersion)
Initializes the handle after opening the file and reading the header.


getFile

public RandomAccessFile getFile()

getFileNum

long getFileNum()

getLogVersion

public int getLogVersion()

isOldHeaderVersion

boolean isOldHeaderVersion()

latch

void latch()
     throws DatabaseException
Throws:
DatabaseException

latchNoWait

boolean latchNoWait()
              throws DatabaseException
Throws:
DatabaseException

release

public void release()
             throws DatabaseException
Throws:
DatabaseException

close

void close()
     throws IOException
Throws:
IOException


Copyright (c) 2004-2010 Oracle. All rights reserved.