KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > log > LogSource


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: LogSource.java,v 1.22 2006/11/03 03:07:51 mark Exp $
7  */

8
9 package com.sleepycat.je.log;
10
11 import java.io.IOException JavaDoc;
12 import java.nio.ByteBuffer JavaDoc;
13
14 import com.sleepycat.je.DatabaseException;
15
16 /**
17  * A class that implements LogSource can return portions of the log.
18  * Is public for unit testing.
19  */

20 public interface LogSource {
21
22     /**
23      * We're done with this log source.
24      */

25     void release() throws DatabaseException;
26
27     /**
28      * Fill the destination byte array with bytes. The offset indicates the
29      * absolute log file position.
30      */

31     ByteBuffer JavaDoc getBytes(long fileOffset) throws IOException JavaDoc;
32
33     /**
34      * Fill the destination byte array with the requested number of bytes. The
35      * offset indicates the absolute position in the log file.
36      */

37     ByteBuffer JavaDoc getBytes(long fileOffset, int numBytes)
38         throws IOException JavaDoc;
39 }
40
Popular Tags