01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.log;
07:
08: import org.h2.store.Storage;
09:
10: /**
11: * Represents a redo-log record.
12: * Such records are only used when recovering.
13: */
14: public class RedoLogRecord {
15: public Storage storage;
16: public int sequenceId;
17: public int recordId;
18: public int offset;
19: public byte[] data;
20:
21: public int getSize() {
22: // estimated memory size in bytes ((5 variables+myself) * 4 bytes each)
23: if (data == null) {
24: return 24;
25: } else {
26: return 28 + data.length;
27: }
28: }
29: }
|