com.sleepycat.je.log
Class FileHandle
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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.