Java Doc for BtreeCursor.java in  » Database-DBMS » Quadcap-Embeddable-Database » com » quadcap » sql » index » 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 » Quadcap Embeddable Database » com.quadcap.sql.index 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.quadcap.sql.lock.PooledObject
      com.quadcap.sql.index.BtreeCursor

BtreeCursor
public class BtreeCursor extends PooledObject implements BCursor(Code)
A cursor for a Quadcap Btree.
author:
   Stan Bailes


Field Summary
 Block[]blocks
    
 Comparatorcompare
    
 byte[]curKey
    
 byte[]curVal
    
 intdepth
    
 ObjectfileLock
    
static  StringBufferlastBuf
    
static  intlastCount
    
 int[]lengths
    
final static  booleannoPool
    
 int[]pointers
    
static  ObjectPoolpool
    
final static  longposAFTER_LAST
    
final static  longposBEFORE_FIRST
    
final static  longposUNKNOWN
    
 longposition
    
 Bnoderoot
    
 longsize
    
 Btreetree
    


Method Summary
public  booleanabsolute(int x)
    
public  voidafterLast()
     Move the cursor after the last key.
public  voidbeforeFirst()
     Move the cursor before the first key.
public  voidclose()
    
public  PooledObjectcreate()
    
public  booleandelete()
    
static  StringdoLine(BCursor bc, String line)
    
final  Stringdr()
    
static  BtreeCursorget(Btree tree, boolean skipSetup)
    
public  intgetKey(byte[] buf)
    
public  byte[]getKey()
    
public  byte[]getKeyBuf()
    
public  intgetKeyLen()
    
final  booleangetNextBlock()
    
final  booleangetPrevBlock()
    
public  intgetVal(byte[] buf)
    
public  byte[]getVal()
    
public  longgetValAsLong()
    
public  byte[]getValBuf()
    
public  intgetValLen()
    
final  voidholdKey(int off)
    
final  Stringid()
    
public  voidinit(Btree tree, boolean skipSetup)
    
public  booleaninsert(byte[] key, int klen, byte[] data, int doff, int dlen)
     Insert a new key/data pair.
public  booleaninsert(byte[] key, byte[] data)
    
static  voiditest(BCursor bc)
    
static  voidjtest(BCursor c)
    
 Stringk(byte[] b, int off, int len)
    
static  voidkshow(BCursor c)
    
static  voidktest(BCursor c)
    
static  voidktest(Btree t)
    
public static  voidmain(String[] args)
    
final static  voidmkey(int i, byte[] b)
    
public  booleannext()
     Move the cursor to the next row and return true if the cursor is positioned on a valid row.
public  longposition()
    
public  booleanprev()
     Move the cursor to the next row and return true if the cursor is positioned on a valid row.
final static  Stringr(boolean b)
    
public  voidrelease()
    
public  booleanreplace(byte[] data, int doff, int dlen)
    
public  booleanreplace(byte[] data)
    
final public  booleanseek(byte[] key)
     Seek: Position the cursor on or before the specified key value.
public  booleanseek(byte[] key, int len)
     Seek, but the key can be a subsequence of the given byte array.
 booleanseek1(int level, byte[] key, int len)
    
final  voidsetBlock(int i, Block b)
     Manage updates to the 'blocks' array through this function to assuage refcount madness.
public  voidsetKeyBuf(byte[] buf)
    
public  voidsetValBuf(byte[] buf)
    
protected  voidsetup(boolean restoreKey)
     Called to re-establish the synchronization of this cursor in the case where the underlying index has been modified.
static  voidshow(String s)
    
public  longsize()
    
static  longsubtreeSize(Bnode root, Block b)
    
 Stringt()
    
final static  longtick()
    
public  StringtoString()
    
public  voidunsetup()
     Called (in theory) by the owning Btree when the index is modified.

Field Detail
blocks
Block[] blocks(Code)



compare
Comparator compare(Code)



curKey
byte[] curKey(Code)



curVal
byte[] curVal(Code)



depth
int depth(Code)



fileLock
Object fileLock(Code)



lastBuf
static StringBuffer lastBuf(Code)



lastCount
static int lastCount(Code)



lengths
int[] lengths(Code)



noPool
final static boolean noPool(Code)



pointers
int[] pointers(Code)



pool
static ObjectPool pool(Code)



posAFTER_LAST
final static long posAFTER_LAST(Code)



posBEFORE_FIRST
final static long posBEFORE_FIRST(Code)



posUNKNOWN
final static long posUNKNOWN(Code)
 For the position variable:
 -2         unknown
 -1         after last
 0         before first
 >0        on key
 



position
long position(Code)



root
Bnode root(Code)



size
long size(Code)



tree
Btree tree(Code)





Method Detail
absolute
public boolean absolute(int x) throws IOException(Code)
Move the cursor to the specified absolute position



afterLast
public void afterLast() throws IOException(Code)
Move the cursor after the last key.



beforeFirst
public void beforeFirst() throws IOException(Code)
Move the cursor before the first key.



close
public void close()(Code)
Close the index



create
public PooledObject create()(Code)
PooledObject factory



delete
public boolean delete() throws IOException(Code)
Delete the current row (if the cursor is positioned on a valid row, that is ;-)



doLine
static String doLine(BCursor bc, String line) throws Exception(Code)



dr
final String dr()(Code)



get
static BtreeCursor get(Btree tree, boolean skipSetup) throws IOException(Code)



getKey
public int getKey(byte[] buf)(Code)



getKey
public byte[] getKey()(Code)



getKeyBuf
public byte[] getKeyBuf()(Code)



getKeyLen
public int getKeyLen()(Code)



getNextBlock
final boolean getNextBlock() throws IOException(Code)



getPrevBlock
final boolean getPrevBlock() throws IOException(Code)



getVal
public int getVal(byte[] buf)(Code)



getVal
public byte[] getVal()(Code)



getValAsLong
public long getValAsLong()(Code)



getValBuf
public byte[] getValBuf()(Code)



getValLen
public int getValLen()(Code)



holdKey
final void holdKey(int off)(Code)



id
final String id()(Code)



init
public void init(Btree tree, boolean skipSetup) throws IOException(Code)
Init for use/reuse



insert
public boolean insert(byte[] key, int klen, byte[] data, int doff, int dlen) throws IOException(Code)
Insert a new key/data pair. We are presumably positioned just before the spot where the new record should go, but we should check, anyway. This will return false if the key already exists in the index.



insert
public boolean insert(byte[] key, byte[] data) throws IOException(Code)



itest
static void itest(BCursor bc) throws IOException(Code)



jtest
static void jtest(BCursor c) throws Exception(Code)



k
String k(byte[] b, int off, int len)(Code)



kshow
static void kshow(BCursor c) throws IOException(Code)



ktest
static void ktest(BCursor c) throws IOException(Code)



ktest
static void ktest(Btree t) throws IOException(Code)



main
public static void main(String[] args)(Code)
Main for testing



mkey
final static void mkey(int i, byte[] b)(Code)



next
public boolean next() throws IOException(Code)
Move the cursor to the next row and return true if the cursor is positioned on a valid row.



position
public long position() throws IOException(Code)
Return the current position in the index



prev
public boolean prev() throws IOException(Code)
Move the cursor to the next row and return true if the cursor is positioned on a valid row.



r
final static String r(boolean b)(Code)



release
public void release()(Code)



replace
public boolean replace(byte[] data, int doff, int dlen) throws IOException(Code)
Replace the data portion of the current item with the specified data



replace
public boolean replace(byte[] data) throws IOException(Code)



seek
final public boolean seek(byte[] key) throws IOException(Code)
Seek: Position the cursor on or before the specified key value. Return true if the key matches exactly.



seek
public boolean seek(byte[] key, int len) throws IOException(Code)
Seek, but the key can be a subsequence of the given byte array.



seek1
boolean seek1(int level, byte[] key, int len) throws IOException(Code)
(Private) seek recursion kernel



setBlock
final void setBlock(int i, Block b)(Code)
Manage updates to the 'blocks' array through this function to assuage refcount madness.



setKeyBuf
public void setKeyBuf(byte[] buf)(Code)



setValBuf
public void setValBuf(byte[] buf)(Code)



setup
protected void setup(boolean restoreKey) throws IOException(Code)
Called to re-establish the synchronization of this cursor in the case where the underlying index has been modified.



show
static void show(String s)(Code)



size
public long size() throws IOException(Code)
Return the total number of entries in this index



subtreeSize
static long subtreeSize(Bnode root, Block b) throws IOException(Code)



t
String t()(Code)



tick
final static long tick()(Code)



toString
public String toString()(Code)



unsetup
public void unsetup()(Code)
Called (in theory) by the owning Btree when the index is modified.



Methods inherited from com.quadcap.sql.lock.PooledObject
public void assertLive()(Code)(Java Doc)
public PooledObject create()(Code)(Java Doc)
public String toString()(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.