KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jofti > btree > IPage


1 /*
2  * Created on 20-Mar-2006
3  *
4  * TODO To change the template for this generated file go to
5  * Window - Preferences - Java - Code Style - Code Templates
6  */

7 package com.jofti.btree;
8
9 import java.nio.ByteBuffer JavaDoc;
10
11
12 import com.jofti.core.IStoreManager;
13
14 /**
15  * <p>
16  * Defines the operations for a disk page. The page wraps the structure of the entries allowing
17  * flexibility in usage in the nodes.
18  * </p>
19  * @author xenephon
20  * @version 1.2
21  */

22 public interface IPage {
23     
24     /**
25      * Returns the entry at the specified position or null if none exists.
26      * @param position
27      * @return The leafNode Entry.
28      */

29     public LeafNodeEntry getEntry(int position);
30
31     /**
32      * <p>
33      * Sets an entry at the specified position. The current entry (if any) and adjacent entries are shuffled up by a position of
34      * 1.
35      * </p>
36      * @param position
37      * @param entry
38      */

39     public void setEntry(int position, LeafNodeEntry entry);
40
41     /**
42      * Removes an entry at the specified position. Larger entries are shuffled down by 1 position.
43      * @param position
44      */

45     public void removeEntry(int position);
46
47     public void updateEntry(int location, LeafNodeEntry entry);
48
49     public ByteBuffer JavaDoc copyBuffer(ByteBuffer JavaDoc newBuf);
50
51     public void reset();
52     
53     public ByteBuffer JavaDoc getBuffer();
54     
55     public int[] getPointers();
56     
57     public void setManager(IStoreManager manager);
58     
59
60 }
Popular Tags