Java Doc for DxDiskHashMap.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » DxLib » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » Ozone 1.1 » org.ozoneDB.DxLib 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ozoneDB.DxLib.DxObject
      org.ozoneDB.DxLib.DxAbstractCollection
         org.ozoneDB.DxLib.DxAbstractMap
            org.ozoneDB.DxLib.DxDiskHashMap

All known Subclasses:   org.ozoneDB.core.wizardStore.IDTable,
DxDiskHashMap
public class DxDiskHashMap extends DxAbstractMap (Code)

author:
   SMB
author:
   Medium.net
version:
   $Revision: 1.3 $Date: 2002/06/08 00:49:38 $


Field Summary
final public static  StringROOT_TABLE_NAME
    
protected  DxSetbuffer
    
public  intbufferAccesses
    
public  intbufferHits
    
public  intcacheAccesses
    
public  intcacheHits
    
protected  intmaxBufferSize
    
final static  longserialVersionUID
    
public  inttableBitSize
    
protected  FiletableDirectory
     The directory where all tables reside.

Constructor Summary
public  DxDiskHashMap(String _baseFileName, int _maxBufferSize, int _cacheBits, int _tableBitSize)
    

Method Summary
public synchronized  booleanaddForKey(Object obj, Object key)
    
public  voidcleanFiles()
     Delete all the files used by this hashtable.
public synchronized  voidclear()
    
public  Objectclone()
    
public synchronized  voidclose()
     Close this hash map.
public  booleancontainsKey(Object key)
    
public  intcount()
    
public synchronized  voiddeleteRequest(DxDiskSubTable subTable)
     The specified sub-table was deleted from the tree.
protected synchronized  voidelementDone(DxDiskHashCompatible obj)
    
public synchronized  ObjectelementForKey(Object key)
     Gives the element for the specified key.

Note: This method is synchronized because the cache of subtables may change.

public  FilegetFileForFilename(String filename)
     Computes a File object which represents the DxDiskSubTable file denoted by the given filename.
There are two formats for the given filename:
  • The long format is a pathname relative to the current working directory of the Java application which wrote the table referring the DxDiskSubTable in question. It may also be an absolute pathname.
public  booleanisDirtyTable(DxDiskSubTable table)
    
public  booleanisEmpty()
    
public  DxIteratoriterator()
    
public  ObjectkeyForElement(Object obj)
    
public  DxKeyDatanewKeyData()
    
public  DxDiskHashNodeBranchnewNodeBranch()
    
public  DxDiskHashNodeLeafnewNodeLeaf()
    
public synchronized  FilenewSubTableFile()
     This method is synchronized because sub table filenames have to be unique.
public  voidprintStatistics()
    
public synchronized  voidre_use()
     Reuse an existing table from disk.
protected synchronized  voidreadRequest(DxDiskSubTable subTable)
     Eine sub-tabelle will nachladen.
public synchronized  booleanremove(Object obj)
    
public synchronized  ObjectremoveForKey(Object key)
    
public  DxDiskSubTablerootTable()
    
public  voidsetReusable(boolean flag)
    
public synchronized  voidwriteAllTables()
    

Field Detail
ROOT_TABLE_NAME
final public static String ROOT_TABLE_NAME(Code)



buffer
protected DxSet buffer(Code)



bufferAccesses
public int bufferAccesses(Code)



bufferHits
public int bufferHits(Code)



cacheAccesses
public int cacheAccesses(Code)



cacheHits
public int cacheHits(Code)



maxBufferSize
protected int maxBufferSize(Code)



serialVersionUID
final static long serialVersionUID(Code)



tableBitSize
public int tableBitSize(Code)



tableDirectory
protected File tableDirectory(Code)
The directory where all tables reside.




Constructor Detail
DxDiskHashMap
public DxDiskHashMap(String _baseFileName, int _maxBufferSize, int _cacheBits, int _tableBitSize)(Code)




Method Detail
addForKey
public synchronized boolean addForKey(Object obj, Object key)(Code)



cleanFiles
public void cleanFiles()(Code)
Delete all the files used by this hashtable.



clear
public synchronized void clear()(Code)



clone
public Object clone()(Code)



close
public synchronized void close() throws Exception(Code)
Close this hash map. Write all changed tables to the disk. Store also all information that are needed to re-initialize this object from the disk data.



containsKey
public boolean containsKey(Object key)(Code)



count
public int count()(Code)



deleteRequest
public synchronized void deleteRequest(DxDiskSubTable subTable)(Code)
The specified sub-table was deleted from the tree. So we have to delete it from the table buffer too.



elementDone
protected synchronized void elementDone(DxDiskHashCompatible obj)(Code)



elementForKey
public synchronized Object elementForKey(Object key)(Code)
Gives the element for the specified key.

Note: This method is synchronized because the cache of subtables may change.




getFileForFilename
public File getFileForFilename(String filename)(Code)
Computes a File object which represents the DxDiskSubTable file denoted by the given filename.
There are two formats for the given filename:
  • The long format is a pathname relative to the current working directory of the Java application which wrote the table referring the DxDiskSubTable in question. It may also be an absolute pathname. This format is error prone as it does not allow changing the working directory of Java applications or changing the location of the table files within the filesystem. That's why the short format is used now.
  • The short format is only the last pathname component of the pathname to the referred DxDiskSubTable file. The other pathname components (e.g. the directory where the DxDiskSubTable file resides) are determined by the directory where the root table resides. This is possible because als DxDiskSubTable files reside in the same directory as the root table file does.
For compatibility with old tables, the long format is broken up into pathname components and only the last pathname component is used then as a directory entry of the directory of the root table file.



isDirtyTable
public boolean isDirtyTable(DxDiskSubTable table)(Code)



isEmpty
public boolean isEmpty()(Code)



iterator
public DxIterator iterator()(Code)



keyForElement
public Object keyForElement(Object obj)(Code)



newKeyData
public DxKeyData newKeyData()(Code)



newNodeBranch
public DxDiskHashNodeBranch newNodeBranch()(Code)



newNodeLeaf
public DxDiskHashNodeLeaf newNodeLeaf()(Code)



newSubTableFile
public synchronized File newSubTableFile()(Code)
This method is synchronized because sub table filenames have to be unique.



printStatistics
public void printStatistics()(Code)



re_use
public synchronized void re_use() throws Exception(Code)
Reuse an existing table from disk. To do so a previously created table has to be correctly closed. Once a hash map has been re-used it has to closed before opening again.



readRequest
protected synchronized void readRequest(DxDiskSubTable subTable) throws Exception(Code)
Eine sub-tabelle will nachladen. Wenn der buffer voll ist, muss eine andere verworfen werden. Die "aelteste" table ist immer ein blatt, da die zeiten mmer beim rekursiven aufstieg gesetzt werden.



remove
public synchronized boolean remove(Object obj)(Code)



removeForKey
public synchronized Object removeForKey(Object key)(Code)



rootTable
public DxDiskSubTable rootTable()(Code)



setReusable
public void setReusable(boolean flag) throws IOException(Code)



writeAllTables
public synchronized void writeAllTables() throws Exception(Code)



Fields inherited from org.ozoneDB.DxLib.DxAbstractMap
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from org.ozoneDB.DxLib.DxAbstractMap
public synchronized boolean add(Object obj)(Code)(Java Doc)
public synchronized boolean addAll(DxCollection coll)(Code)(Java Doc)
public Object buildKey(Object obj)(Code)(Java Doc)
public Object clone(DxMap newMap)(Code)(Java Doc)
public boolean containsKey(Object key)(Code)(Java Doc)
public DxSet elementSet()(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public DxSet keySet()(Code)(Java Doc)
public synchronized void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)(Java Doc)
public synchronized boolean removeAllKeys(DxCollection coll)(Code)(Java Doc)
public DxCollection valueClone()(Code)(Java Doc)
public void writeExternal(ObjectOutput out) throws IOException(Code)(Java Doc)

Fields inherited from org.ozoneDB.DxLib.DxAbstractCollection
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from org.ozoneDB.DxLib.DxAbstractCollection
public synchronized boolean addAll(DxCollection coll)(Code)(Java Doc)
public synchronized boolean addAll(Object[] objs)(Code)(Java Doc)
public Object clone(DxCollection newInstance)(Code)(Java Doc)
public boolean contains(Object obj)(Code)(Java Doc)
public boolean containsAll(DxCollection coll)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public synchronized void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)(Java Doc)
public synchronized boolean remove(Object obj)(Code)(Java Doc)
public synchronized boolean removeAll(DxCollection coll)(Code)(Java Doc)
public Object[] toArray()(Code)(Java Doc)
public DxCollection valueClone()(Code)(Java Doc)
public void writeExternal(ObjectOutput out) throws IOException(Code)(Java Doc)

Fields inherited from org.ozoneDB.DxLib.DxObject
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from org.ozoneDB.DxLib.DxObject
public Object clone()(Code)(Java Doc)
public boolean isLess(DxCompatible obj)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.