01: /*
02: * Created on 20-Mar-2006
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package com.jofti.btree;
08:
09: import java.nio.ByteBuffer;
10:
11: import com.jofti.core.IStoreManager;
12:
13: /**
14: * <p>
15: * Defines the operations for a disk page. The page wraps the structure of the entries allowing
16: * flexibility in usage in the nodes.
17: * </p>
18: * @author xenephon
19: * @version 1.2
20: */
21: public interface IPage {
22:
23: /**
24: * Returns the entry at the specified position or null if none exists.
25: * @param position
26: * @return The leafNode Entry.
27: */
28: public LeafNodeEntry getEntry(int position);
29:
30: /**
31: * <p>
32: * Sets an entry at the specified position. The current entry (if any) and adjacent entries are shuffled up by a position of
33: * 1.
34: * </p>
35: * @param position
36: * @param entry
37: */
38: public void setEntry(int position, LeafNodeEntry entry);
39:
40: /**
41: * Removes an entry at the specified position. Larger entries are shuffled down by 1 position.
42: * @param position
43: */
44: public void removeEntry(int position);
45:
46: public void updateEntry(int location, LeafNodeEntry entry);
47:
48: public ByteBuffer copyBuffer(ByteBuffer newBuf);
49:
50: public void reset();
51:
52: public ByteBuffer getBuffer();
53:
54: public int[] getPointers();
55:
56: public void setManager(IStoreManager manager);
57:
58: }
|