KickJava   Java API By Example, From Geeks To Geeks.

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


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

8
9 package com.sleepycat.je.log;
10
11 import com.sleepycat.je.DatabaseException;
12
13 /**
14  * A class that implements LoggableObject can be stored as a JE log entry.
15  */

16 public interface LoggableObject extends LogWritable {
17
18     /**
19      * All objects that are reponsible for a generating a type of log entry
20      * must implement this.
21      * @return the type of log entry
22      */

23     public LogEntryType getLogType();
24
25     /**
26      * Do any processing we need to do after logging, while under the logging
27      * latch.
28      */

29     public void postLogWork(long justLoggedLsn)
30         throws DatabaseException;
31
32     /**
33      * Return true if this item can be marshalled outside the log write
34      * latch.
35      */

36     public boolean marshallOutsideWriteLatch();
37
38     /**
39      * Returns true if this item should be counted as obsoleted when logged.
40      * This currently applies to deleted LNs only.
41      */

42     public boolean countAsObsoleteWhenLogged();
43 }
44
Popular Tags