KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > datasystem > indexsystem > BTreeControlCluster


1 package com.daffodilwoods.daffodildb.server.datasystem.indexsystem;
2
3 import com.daffodilwoods.daffodildb.server.datasystem.btree.*;
4 import com.daffodilwoods.daffodildb.server.datasystem.interfaces.*;
5 import com.daffodilwoods.daffodildb.server.datasystem.persistentsystem.*;
6 import com.daffodilwoods.daffodildb.utils.byteconverter.*;
7 import com.daffodilwoods.database.resource.*;
8 import com.daffodilwoods.daffodildb.server.datasystem.persistentsystem.versioninfo.VersionHandler;
9 import com.daffodilwoods.daffodildb.server.datasystem.interfaces._DatabaseUser;
10
11 /**
12  * For knowing the Use of This class just read the "Why_we_need_control_clusters_In_Btree.doc"
13  *
14  */

15
16 public abstract class BTreeControlCluster {
17
18   /**
19    * Address of control cluster
20    */

21   public int address;
22
23   /**
24    * Through which it can get the control cluster
25    */

26
27   public _ClusterProvider clusterProvider;
28
29   public int rootNodeAddress = -1;
30   public VersionHandler versionHandler;
31
32
33   /**
34    * Returns the address of root node stored in Control cluster.
35    */

36   public abstract int getRootClusterAddress() throws DException;
37
38
39   /**
40    * Update the Informations stored in it
41    * 1. Address RootNode of Btree
42    * 2. Size Of Btree
43    */

44
45
46   public abstract void updateBTreeInfo(_DatabaseUser user,BTreeNode node, int btreeSize)throws DException;
47
48   /**
49    * Returns the size of btree stored in Control cluster.
50    */

51
52   public abstract int getSize()throws DException;
53
54   public abstract void releaseControlCluster(_DatabaseUser user) throws DException;
55 }
56
Popular Tags