KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > log > entry > LogEntry


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

8
9 package com.sleepycat.je.log.entry;
10
11 import java.nio.ByteBuffer JavaDoc;
12
13 import com.sleepycat.je.DatabaseException;
14
15 /**
16  * A Log entry allows you to read, write and dump a database log entry. Each
17  * entry may be made up of one or more loggable items.
18  */

19 public interface LogEntry extends Cloneable JavaDoc {
20
21     /**
22      * Read in an log entry.
23      */

24     void readEntry(ByteBuffer JavaDoc entryBuffer, int entrySize,
25                    byte entryTypeVersion, boolean readFullItem)
26         throws DatabaseException;
27
28     /**
29      * Print out the contents of an entry.
30      */

31     StringBuffer JavaDoc dumpEntry(StringBuffer JavaDoc sb, boolean verbose);
32
33     /**
34      * @return the first item of the log entry
35      */

36     Object JavaDoc getMainItem();
37
38     /**
39      * @return a shallow clone.
40      */

41     public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc;
42
43     /**
44      * @return true if the LogEntry is a transactional log entry type.
45      */

46     public boolean isTransactional();
47
48     /**
49      * @return return the transaction id if this log entry is transactional,
50      * 0 otherwise.
51      */

52     public long getTransactionId();
53 }
54
Popular Tags