1 /*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2002,2006 Oracle. All rights reserved. 5 * 6 * $Id: LogWritable.java,v 1.15 2006/10/30 21:14:20 bostic Exp $ 7 */ 8 9 package com.sleepycat.je.log; 10 11 import java.nio.ByteBuffer; 12 13 /** 14 * A class that implements LogWritable knows how to write itself into the JE 15 * log. 16 */ 17 public interface LogWritable { 18 19 /** 20 * @return number of bytes used to store this object. 21 */ 22 public int getLogSize(); 23 24 /** 25 * Serialize this object into the buffer. 26 * @param logBuffer is the destination buffer 27 */ 28 public void writeToLog(ByteBuffer logBuffer); 29 } 30