01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: FileHandleSource.java,v 1.12.2.3 2008/01/07 15:14:13 cwl Exp $
07: */
08:
09: package com.sleepycat.je.log;
10:
11: import com.sleepycat.je.DatabaseException;
12:
13: /**
14: * FileHandleSource is a file source built on top of a cached file handle.
15: */
16: class FileHandleSource extends FileSource {
17:
18: private FileHandle fileHandle;
19:
20: FileHandleSource(FileHandle fileHandle, int readBufferSize,
21: FileManager fileManager) {
22: super (fileHandle.getFile(), readBufferSize, fileManager);
23: this .fileHandle = fileHandle;
24: }
25:
26: /**
27: * @see LogSource#release
28: */
29: public void release() throws DatabaseException {
30:
31: fileHandle.release();
32: }
33: }
|