KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > db4o > db4ounit > common > btree > FreespaceManagerForDebug


1 /* Copyright (C) 2004 - 2006 db4objects Inc. http://www.db4o.com
2
3 This file is part of the db4o open source object database.
4
5 db4o is free software; you can redistribute it and/or modify it under
6 the terms of version 2 of the GNU General Public License as published
7 by the Free Software Foundation and as clarified by db4objects' GPL
8 interpretation policy, available at
9 http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
10 Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
11 Suite 350, San Mateo, CA 94403, USA.
12
13 db4o is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

21 package com.db4o.db4ounit.common.btree;
22
23 import com.db4o.*;
24 import com.db4o.inside.freespace.*;
25 import com.db4o.inside.slots.*;
26
27
28 public class FreespaceManagerForDebug extends FreespaceManager {
29
30     private final SlotListener _listener;
31
32     public FreespaceManagerForDebug(YapFile file, SlotListener listener) {
33         super(file);
34         _listener = listener;
35     }
36
37     public void beginCommit() {
38
39     }
40
41     public void debug() {
42         
43     }
44
45     public void endCommit() {
46
47     }
48
49     public int entryCount() {
50         return 0;
51     }
52
53     public void free(int address, int length) {
54         _listener.onFree(new Slot(address, length));
55     }
56
57     public void freeSelf() {
58
59     }
60
61     public int freeSize() {
62         return 0;
63     }
64
65     public int getSlot(int length) {
66         return 0;
67     }
68
69     public void migrate(FreespaceManager newFM) {
70
71     }
72
73     public void onNew(YapFile file) {
74         
75     }
76     
77     public void read(int freeSlotsID) {
78
79     }
80
81     public void start(int slotAddress) {
82
83     }
84
85     public byte systemType() {
86         return FM_DEBUG;
87     }
88
89     public int write(boolean shuttingDown) {
90         return 0;
91     }
92
93 }
94
Popular Tags