XrdCmsNash.hh

Go to the documentation of this file.
00001 #ifndef __XRDCMSNASH_HH__
00002 #define __XRDCMSNASH_HH__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                         X r d C m s N a s h . h h                          */
00006 /*                                                                            */
00007 /* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 //         $Id: XrdCmsNash.hh 24468 2008-06-22 16:47:03Z ganis $
00014 
00015 #include "XrdCms/XrdCmsKey.hh"
00016   
00017 class XrdCmsNash
00018 {
00019 public:
00020 XrdCmsKeyItem *Add(XrdCmsKey &Key);
00021 
00022 XrdCmsKeyItem *Find(XrdCmsKey &Key);
00023 
00024 int            Recycle(XrdCmsKeyItem *rip);
00025 
00026 // When allocateing a new nash, specify the required starting size. Make
00027 // sure that the previous number is the correct Fibonocci antecedent. The
00028 // series is simply n[j] = n[j-1] + n[j-2].
00029 //
00030     XrdCmsNash(int psize = 17711, int size = 28657);
00031    ~XrdCmsNash() {} // Never gets deleted
00032 
00033 private:
00034 
00035 static const int LoadMax = 80;
00036 
00037 void               Expand();
00038 
00039 XrdCmsKeyItem  **nashtable;
00040 int              prevtablesize;
00041 int              nashtablesize;
00042 int              nashnum;
00043 int              Threshold;
00044 };
00045 #endif

Generated on Tue Jul 5 14:46:30 2011 for ROOT_528-00b_version by  doxygen 1.5.1