KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: LogReadable.java,v 1.19 2006/10/30 21:14:20 bostic Exp $
7  */

8
9 package com.sleepycat.je.log;
10
11 import java.nio.ByteBuffer JavaDoc;
12
13 /**
14  * A class that implements LogReadable knows how to read itself from the JE
15  * log.
16  */

17 public interface LogReadable {
18
19     /**
20      * Initialize this object from the data in itemBuf.
21      * @param itemBuf the source buffer
22      */

23     public void readFromLog(ByteBuffer JavaDoc itemBuffer, byte entryTypeVersion)
24     throws LogException;
25
26     /**
27      * Write the object into the string buffer for log dumping. Each object
28      * should be dumped without indentation or new lines and should be valid
29      * XML.
30      * @param sb destination string buffer
31      * @param verbose if true, dump the full, verbose version
32      */

33     public void dumpLog(StringBuffer JavaDoc sb, boolean verbose);
34
35     /**
36      * @return true if the LogEntry is a transactional log entry type.
37      */

38     public boolean logEntryIsTransactional();
39
40     /**
41      * @return return the transaction id if this log entry is transactional,
42      * 0 otherwise.
43      */

44     public long getTransactionId();
45 }
46
Popular Tags