Java Doc for KeyRange.java in  » JMX » je » com » sleepycat » util » keyrange » 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 » JMX » je » com.sleepycat.util.keyrange 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sleepycat.util.keyrange.KeyRange

KeyRange
public class KeyRange (Code)
Encapsulates a key range for use with a RangeCursor.


Field Summary
final public static  byte[]ZERO_LENGTH_BYTE_ARRAY
    
 booleanbeginInclusive
    
 DatabaseEntrybeginKey
    
 Comparatorcomparator
    
 booleanendInclusive
    
 DatabaseEntryendKey
    
 booleansingleKey
    

Constructor Summary
public  KeyRange(Comparator comparator)
     Creates an unconstrained key range.

Method Summary
public  booleancheck(DatabaseEntry key)
     Returns whether a given key is within range.
public  booleancheck(DatabaseEntry key, boolean inclusive)
     Returns whether a given key is within range.
public  booleancheckBegin(DatabaseEntry key, boolean inclusive)
     Returns whether the given key is within range with respect to the beginning of the range.

The inclusive parameter should be true for checking a key read from the database; this will require that the key is within range.

public  booleancheckEnd(DatabaseEntry key, boolean inclusive)
     Returns whether the given key is within range with respect to the end of the range.
public  intcompare(DatabaseEntry key1, DatabaseEntry key2)
     Compares two keys, using the user comparator if there is one.
public static  intcompareBytes(byte[] data1, int offset1, int size1, byte[] data2, int offset2, int size2)
     Compares two keys as unsigned byte arrays, which is the default comparison used by JE/DB.
public static  DatabaseEntrycopy(DatabaseEntry from)
     Returns a copy of an entry.
public static  voidcopy(DatabaseEntry from, DatabaseEntry to)
     Copies one entry to another.
public static  byte[]copyBytes(byte[] bytes)
     Copies a byte array.
public static  booleanequalBytes(byte[] data1, int offset1, int size1, byte[] data2, int offset2, int size2)
     Compares two byte arrays for equality.
public static  booleanequalBytes(DatabaseEntry e1, DatabaseEntry e2)
     Returns the two DatabaseEntry objects have the same data value.
public static  byte[]getByteArray(DatabaseEntry entry)
     Returns an entry's byte array, copying it if the entry offset is non-zero.
public static  byte[]getByteArray(DatabaseEntry entry, int maxBytes)
    
final public  DatabaseEntrygetSingleKey()
     Returns the key of a single-key range, or null if not a single-key range.
final public  booleanhasBound()
     Returns whether this range has a begin or end bound.
final public  booleanisSingleKey()
     Returns whether this is a single-key range.
public  KeyRangesubRange(DatabaseEntry key)
     Creates a range for a single key.
public  KeyRangesubRange(DatabaseEntry beginKey, boolean beginInclusive, DatabaseEntry endKey, boolean endInclusive)
     Creates a range that is the intersection of this range and the given range parameters.
public  StringtoString()
     Formats this range as a string for debugging.
public static  StringtoString(DatabaseEntry dbt)
     Converts the byte array of this thang to space-separated integers, and suffixed by the record number if applicable.

Field Detail
ZERO_LENGTH_BYTE_ARRAY
final public static byte[] ZERO_LENGTH_BYTE_ARRAY(Code)



beginInclusive
boolean beginInclusive(Code)



beginKey
DatabaseEntry beginKey(Code)



comparator
Comparator comparator(Code)



endInclusive
boolean endInclusive(Code)



endKey
DatabaseEntry endKey(Code)



singleKey
boolean singleKey(Code)




Constructor Detail
KeyRange
public KeyRange(Comparator comparator)(Code)
Creates an unconstrained key range.




Method Detail
check
public boolean check(DatabaseEntry key)(Code)
Returns whether a given key is within range.



check
public boolean check(DatabaseEntry key, boolean inclusive)(Code)
Returns whether a given key is within range.



checkBegin
public boolean checkBegin(DatabaseEntry key, boolean inclusive)(Code)
Returns whether the given key is within range with respect to the beginning of the range.

The inclusive parameter should be true for checking a key read from the database; this will require that the key is within range. When inclusive=false the key is allowed to be equal to the beginKey for the range; this is used for checking a new exclusive bound of a sub-range.

Note that when inclusive=false and beginInclusive=true our check is not exactly correct because in theory we should allow the key to be "one less" than the existing bound; however, checking for "one less" is impossible so we do the best we can and test the bounds conservatively.




checkEnd
public boolean checkEnd(DatabaseEntry key, boolean inclusive)(Code)
Returns whether the given key is within range with respect to the end of the range. See checkBegin for details.



compare
public int compare(DatabaseEntry key1, DatabaseEntry key2)(Code)
Compares two keys, using the user comparator if there is one.



compareBytes
public static int compareBytes(byte[] data1, int offset1, int size1, byte[] data2, int offset2, int size2)(Code)
Compares two keys as unsigned byte arrays, which is the default comparison used by JE/DB.



copy
public static DatabaseEntry copy(DatabaseEntry from)(Code)
Returns a copy of an entry.



copy
public static void copy(DatabaseEntry from, DatabaseEntry to)(Code)
Copies one entry to another.



copyBytes
public static byte[] copyBytes(byte[] bytes)(Code)
Copies a byte array.



equalBytes
public static boolean equalBytes(byte[] data1, int offset1, int size1, byte[] data2, int offset2, int size2)(Code)
Compares two byte arrays for equality.



equalBytes
public static boolean equalBytes(DatabaseEntry e1, DatabaseEntry e2)(Code)
Returns the two DatabaseEntry objects have the same data value.



getByteArray
public static byte[] getByteArray(DatabaseEntry entry)(Code)
Returns an entry's byte array, copying it if the entry offset is non-zero.



getByteArray
public static byte[] getByteArray(DatabaseEntry entry, int maxBytes)(Code)



getSingleKey
final public DatabaseEntry getSingleKey()(Code)
Returns the key of a single-key range, or null if not a single-key range.



hasBound
final public boolean hasBound()(Code)
Returns whether this range has a begin or end bound.



isSingleKey
final public boolean isSingleKey()(Code)
Returns whether this is a single-key range.



subRange
public KeyRange subRange(DatabaseEntry key) throws KeyRangeException(Code)
Creates a range for a single key.



subRange
public KeyRange subRange(DatabaseEntry beginKey, boolean beginInclusive, DatabaseEntry endKey, boolean endInclusive) throws KeyRangeException(Code)
Creates a range that is the intersection of this range and the given range parameters.



toString
public String toString()(Code)
Formats this range as a string for debugging.



toString
public static String toString(DatabaseEntry dbt)(Code)
Converts the byte array of this thang to space-separated integers, and suffixed by the record number if applicable.
Parameters:
  dbt - the thang to convert.
Parameters:
  the - resulting string.



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.