From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/java/com/sleepycat/db/Cursor.html | 2601 +++++++++++++++----------------- 1 file changed, 1251 insertions(+), 1350 deletions(-) (limited to 'docs/java/com/sleepycat/db/Cursor.html') diff --git a/docs/java/com/sleepycat/db/Cursor.html b/docs/java/com/sleepycat/db/Cursor.html index fae1c073..64ca90bc 100644 --- a/docs/java/com/sleepycat/db/Cursor.html +++ b/docs/java/com/sleepycat/db/Cursor.html @@ -1,110 +1,109 @@ - - - - - -Cursor (Oracle - Berkeley DB Java API) - - - - - - - - - - - - -
- - +//--> + + - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-

- -com.sleepycat.db -
-Class Cursor

-
-java.lang.Object
-  extended by com.sleepycat.db.Cursor
-
-
-
Direct Known Subclasses:
SecondaryCursor
-
-
-
-
public class Cursor
extends Object
- - -

-A database cursor. Cursors are used for operating on collections of +

+
com.sleepycat.db
+

Class Cursor

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    SecondaryCursor
    +
    +
    +
    +
    public class Cursor
    +extends java.lang.Object
    +
    A database cursor. Cursors are used for operating on collections of records, for iterating over a database, and for saving handles to individual records, so that they can be modified after they have been read. @@ -138,395 +137,343 @@ in the scan; that is, records inserted behind a cursor will not be returned while records inserted in front of a cursor will be returned. In Queue and Recno databases, missing entries (that is, entries that were never explicitly created or that were created and then deleted) -will be ignored during a sequential scan. -

    - -

    -


    - -

    - +will be ignored during a sequential scan.

    +
  • +
+
+
+ + + +
+
+
    +
  • - - - - - - -
    -Constructor Detail
    - -

    -Cursor

    -
    -protected Cursor(Database database,
    -                 CursorConfig config)
    -
    -
    - + - - - - - - -
    -Method Detail
    - -

    -close

    -
    -public void close()
    -           throws DatabaseException
    -
    -
    Discard the cursor. +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws DatabaseException
        +
        Discard the cursor.

        After the close method has been called, you cannot use the cursor handle again. @@ -538,151 +485,134 @@ public void close() However, it is recommended that you always close all cursor handles immediately after their use to promote concurrency and to release resources such as page locks. -

        -

        -

        - -
        Throws: -
        DeadlockException - if the operation was selected to resolve a +

        +
        Throws:
        +
        DeadlockException - if the operation was selected to resolve a deadlock. If the application is already intending to abort the transaction, this exception should be ignored, and the application should proceed. -

        -

        DatabaseException - if a failure occurs.
        -
    -
    -
    - -

    -dup

    -
    -public Cursor dup(boolean samePosition)
    -           throws DatabaseException
    -
    -
    Creates a new cursor that uses the same transaction and locker ID as the +

    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + +
    +
  • +

    dup

    +
    public Cursor dup(boolean samePosition)
    +           throws DatabaseException
    +
    Creates a new cursor that uses the same transaction and locker ID as the original cursor.

    This is useful when an application is using locking and requires two or more cursors in the same thread of control. -

    -

    -

    -
    Parameters:
    samePosition - If true, the newly created cursor is initialized to refer to the +

    +
    Parameters:
    samePosition - If true, the newly created cursor is initialized to refer to the same position in the database as the original cursor (if any) and hold the same locks (if any). If false, or the original cursor does not hold a database position and locks, the returned cursor is uninitialized and will behave like a newly created cursor. -

    -

    Returns:
    A new cursor with the same transaction and locker ID as the original +

    +
    Returns:
    A new cursor with the same transaction and locker ID as the original cursor.

    -

    -

    Throws: -
    DatabaseException - if a failure occurs.
    - - -
    - -

    -getConfig

    -
    -public CursorConfig getConfig()
    -
    -
    Return this cursor's configuration. +

    +
    Throws:
    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + +
    +
  • +

    getConfig

    +
    public CursorConfig getConfig()
    +
    Return this cursor's configuration.

    This may differ from the configuration used to open this object if the cursor existed previously. +

    +
    Returns:
    This cursor's configuration.

    -

    -

    - -
    Returns:
    This cursor's configuration. -

    -

    -

    Throws: -
    DatabaseException - if a failure occurs.
    -
    -
    -
    - -

    -getDatabase

    -
    -public Database getDatabase()
    -
    -
    Return the Database handle associated with this Cursor. - -

    -

    -

    - -
    Returns:
    The Database handle associated with this Cursor. -

    -
    -
    -
    - -

    -compare

    -
    -public int compare(Cursor OtherCursor)
    -            throws DatabaseException
    -
    -
    Return a comparison of the two cursors. Two cursors are +

    +
    Throws:
    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + +
    +
  • +

    getDatabase

    +
    public Database getDatabase()
    +
    Return the Database handle associated with this Cursor. + +

    +
    Returns:
    The Database handle associated with this Cursor. +

    +
  • +
+ + + +
    +
  • +

    compare

    +
    public int compare(Cursor OtherCursor)
    +            throws DatabaseException
    +
    Return a comparison of the two cursors. Two cursors are equal if and only if they are positioned on the same item in the same database. -

    -

    -

    - -
    Returns:
    An integer representing the result of the +

    +
    Returns:
    An integer representing the result of the comparison between this cursor and OtherCursor (another cursor handle used as the comparator). 0 indicates that this cursor and OtherCursor are positioned on the same item, 1 indicates this cursor is greater than OtherCursor, -1 indicates that OtherCursor is greater than this cursor.

    -

    -

    Throws: -
    DeadlockException - if the operation was selected to resolve a +

    +
    Throws:
    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    DatabaseException - if a failure occurs.
    - - -
    - -

    -count

    -
    -public int count()
    -          throws DatabaseException
    -
    -
    Return a count of the number of data items for the key to which the +

    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + +
    +
  • +

    count

    +
    public int count()
    +          throws DatabaseException
    +
    Return a count of the number of data items for the key to which the cursor refers. -

    -

    -

    - -
    Returns:
    A count of the number of data items for the key to which the cursor +

    +
    Returns:
    A count of the number of data items for the key to which the cursor refers.

    -

    -

    Throws: -
    DeadlockException - if the operation was selected to resolve a +

    +
    Throws:
    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    DatabaseException - if a failure occurs.
    - - -
    - -

    -delete

    -
    -public OperationStatus delete()
    -                       throws DatabaseException
    -
    -
    Delete the key/data pair to which the cursor refers. +

    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + + + + + +
    +
  • +

    getCurrent

    +
    public OperationStatus getCurrent(DatabaseEntry key,
    +                         DatabaseEntry data,
    +                         LockMode lockMode)
    +                           throws DatabaseException
    +
    Returns the key/data pair to which the cursor refers.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.KEYEMPTY if the key/pair at the cursor -position has been deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.KEYEMPTY if the key/pair at the cursor +position has been deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getFirst

    -
    -public OperationStatus getFirst(DatabaseEntry key,
    -                                DatabaseEntry data,
    -                                LockMode lockMode)
    -                         throws DatabaseException
    -
    -
    Move the cursor to the first key/data pair of the database, and return +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getFirst

    +
    public OperationStatus getFirst(DatabaseEntry key,
    +                       DatabaseEntry data,
    +                       LockMode lockMode)
    +                         throws DatabaseException
    +
    Move the cursor to the first key/data pair of the database, and return that pair. If the first key has duplicate values, the first data item in the set of duplicates is returned.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getLast

    -
    -public OperationStatus getLast(DatabaseEntry key,
    -                               DatabaseEntry data,
    -                               LockMode lockMode)
    -                        throws DatabaseException
    -
    -
    Move the cursor to the last key/data pair of the database, and return +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getLast

    +
    public OperationStatus getLast(DatabaseEntry key,
    +                      DatabaseEntry data,
    +                      LockMode lockMode)
    +                        throws DatabaseException
    +
    Move the cursor to the last key/data pair of the database, and return that pair. If the last key has duplicate values, the last data item in the set of duplicates is returned.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Its byte array does not need to be initialized by the -caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getNext

    -
    -public OperationStatus getNext(DatabaseEntry key,
    -                               DatabaseEntry data,
    -                               LockMode lockMode)
    -                        throws DatabaseException
    -
    -
    Move the cursor to the next key/data pair and return that pair. If +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getNext

    +
    public OperationStatus getNext(DatabaseEntry key,
    +                      DatabaseEntry data,
    +                      LockMode lockMode)
    +                        throws DatabaseException
    +
    Move the cursor to the next key/data pair and return that pair. If the matching key has duplicate values, the first data item in the set of duplicates is returned.

    @@ -838,80 +759,76 @@ is returned. In the presence of duplicate key values, the value of the key may not change.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getNextDup

    -
    -public OperationStatus getNextDup(DatabaseEntry key,
    -                                  DatabaseEntry data,
    -                                  LockMode lockMode)
    -                           throws DatabaseException
    -
    -
    If the next key/data pair of the database is a duplicate data record for +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getNextDup

    +
    public OperationStatus getNextDup(DatabaseEntry key,
    +                         DatabaseEntry data,
    +                         LockMode lockMode)
    +                           throws DatabaseException
    +
    If the next key/data pair of the database is a duplicate data record for the current key/data pair, move the cursor to the next key/data pair of the database and return that pair.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getNextNoDup

    -
    -public OperationStatus getNextNoDup(DatabaseEntry key,
    -                                    DatabaseEntry data,
    -                                    LockMode lockMode)
    -                             throws DatabaseException
    -
    -
    Move the cursor to the next non-duplicate key/data pair and return +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getNextNoDup

    +
    public OperationStatus getNextNoDup(DatabaseEntry key,
    +                           DatabaseEntry data,
    +                           LockMode lockMode)
    +                             throws DatabaseException
    +
    Move the cursor to the next non-duplicate key/data pair and return that pair. If the matching key has duplicate values, the first data item in the set of duplicates is returned.

    @@ -921,41 +838,39 @@ cursor is moved to the next non-duplicate key of the database, and that key/data pair is returned.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getPrev

    -
    -public OperationStatus getPrev(DatabaseEntry key,
    -                               DatabaseEntry data,
    -                               LockMode lockMode)
    -                        throws DatabaseException
    -
    -
    Move the cursor to the previous key/data pair and return that pair. +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getPrev

    +
    public OperationStatus getPrev(DatabaseEntry key,
    +                      DatabaseEntry data,
    +                      LockMode lockMode)
    +                        throws DatabaseException
    +
    Move the cursor to the previous key/data pair and return that pair. If the matching key has duplicate values, the last data item in the set of duplicates is returned.

    @@ -966,78 +881,74 @@ pair is returned. In the presence of duplicate key values, the value of the key may not change.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Its byte array does not need to be initialized by the -caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getPrevDup

    -
    -public OperationStatus getPrevDup(DatabaseEntry key,
    -                                  DatabaseEntry data,
    -                                  LockMode lockMode)
    -                           throws DatabaseException
    -
    -
    If the previous key/data pair of the database is a duplicate data record +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getPrevDup

    +
    public OperationStatus getPrevDup(DatabaseEntry key,
    +                         DatabaseEntry data,
    +                         LockMode lockMode)
    +                           throws DatabaseException
    +
    If the previous key/data pair of the database is a duplicate data record for the current key/data pair, move the cursor to the previous key/data pair of the database and return that pair.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Its byte array does not need to be initialized by the -caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getPrevNoDup

    -
    -public OperationStatus getPrevNoDup(DatabaseEntry key,
    -                                    DatabaseEntry data,
    -                                    LockMode lockMode)
    -                             throws DatabaseException
    -
    -
    Move the cursor to the previous non-duplicate key/data pair and return +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getPrevNoDup

    +
    public OperationStatus getPrevNoDup(DatabaseEntry key,
    +                           DatabaseEntry data,
    +                           LockMode lockMode)
    +                             throws DatabaseException
    +
    Move the cursor to the previous non-duplicate key/data pair and return that pair. If the matching key has duplicate values, the last data item in the set of duplicates is returned.

    @@ -1047,116 +958,110 @@ cursor is moved to the previous non-duplicate key of the database, and that key/data pair is returned.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Its byte array does not need to be initialized by the -caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getRecordNumber

    -
    -public OperationStatus getRecordNumber(DatabaseEntry data,
    -                                       LockMode lockMode)
    -                                throws DatabaseException
    -
    -
    Return the record number associated with the cursor. The record number +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getRecordNumber

    +
    public OperationStatus getRecordNumber(DatabaseEntry data,
    +                              LockMode lockMode)
    +                                throws DatabaseException
    +
    Return the record number associated with the cursor. The record number will be returned in the data parameter.

    For this method to be called, the underlying database must be of type Btree, and it must have been configured to support record numbers.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    data - the data +unchanged.
    +
    Parameters:
    data - the data returned as output. Its byte array does not need to be initialized by the -caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getSearchKey

    -
    -public OperationStatus getSearchKey(DatabaseEntry key,
    -                                    DatabaseEntry data,
    -                                    LockMode lockMode)
    -                             throws DatabaseException
    -
    -
    Move the cursor to the given key of the database, and return the datum +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getSearchKey

    +
    public OperationStatus getSearchKey(DatabaseEntry key,
    +                           DatabaseEntry data,
    +                           LockMode lockMode)
    +                             throws DatabaseException
    +
    Move the cursor to the given key of the database, and return the datum associated with the given key. If the matching key has duplicate values, the first data item in the set of duplicates is returned.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key used as input. It must be initialized with a non-null byte array by the -caller.
    data - the data +caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getSearchKeyRange

    -
    -public OperationStatus getSearchKeyRange(DatabaseEntry key,
    -                                         DatabaseEntry data,
    -                                         LockMode lockMode)
    -                                  throws DatabaseException
    -
    -
    Move the cursor to the closest matching key of the database, and return +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getSearchKeyRange

    +
    public OperationStatus getSearchKeyRange(DatabaseEntry key,
    +                                DatabaseEntry data,
    +                                LockMode lockMode)
    +                                  throws DatabaseException
    +
    Move the cursor to the closest matching key of the database, and return the data item associated with the matching key. If the matching key has duplicate values, the first data item in the set of duplicates is returned.

    @@ -1165,78 +1070,74 @@ to the specified key (as determined by the key comparison function), permitting partial key matches and range searches.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key used as input and returned as output. It must be initialized with a non-null -byte array by the caller.
    data - the data +byte array by the caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getSearchBoth

    -
    -public OperationStatus getSearchBoth(DatabaseEntry key,
    -                                     DatabaseEntry data,
    -                                     LockMode lockMode)
    -                              throws DatabaseException
    -
    -
    Move the cursor to the specified key/data pair, where both the key and +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getSearchBoth

    +
    public OperationStatus getSearchBoth(DatabaseEntry key,
    +                            DatabaseEntry data,
    +                            LockMode lockMode)
    +                              throws DatabaseException
    +
    Move the cursor to the specified key/data pair, where both the key and data items must match.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key used as input. It must be initialized with a non-null byte array by the -caller.
    data - the data +caller.
    data - the data used as input. It must be initialized with a non-null byte array by the -caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getSearchBothRange

    -
    -public OperationStatus getSearchBothRange(DatabaseEntry key,
    -                                          DatabaseEntry data,
    -                                          LockMode lockMode)
    -                                   throws DatabaseException
    -
    -
    Move the cursor to the specified key and matching data item of the database. +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getSearchBothRange

    +
    public OperationStatus getSearchBothRange(DatabaseEntry key,
    +                                 DatabaseEntry data,
    +                                 LockMode lockMode)
    +                                   throws DatabaseException
    +
    Move the cursor to the specified key and matching data item of the database.

    In the case of any database supporting sorted duplicate sets, the returned key/data pair is for the smallest data item greater than or equal to the @@ -1244,84 +1145,80 @@ specified data item (as determined by the duplicate comparison function), permitting partial matches and range searches in duplicate data sets.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key used as input and returned as output. It must be initialized with a non-null -byte array by the caller.
    data - the data +byte array by the caller.
    data - the data used as input and returned as output. It must be initialized with a non-null -byte array by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +byte array by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -getSearchRecordNumber

    -
    -public OperationStatus getSearchRecordNumber(DatabaseEntry key,
    -                                             DatabaseEntry data,
    -                                             LockMode lockMode)
    -                                      throws DatabaseException
    -
    -
    Move the cursor to the specific numbered record of the database, and +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    getSearchRecordNumber

    +
    public OperationStatus getSearchRecordNumber(DatabaseEntry key,
    +                                    DatabaseEntry data,
    +                                    LockMode lockMode)
    +                                      throws DatabaseException
    +
    Move the cursor to the specific numbered record of the database, and return the associated key/data pair.

    The data field of the specified key must be a byte array containing a -record number, as described in DatabaseEntry. This determines +record number, as described in DatabaseEntry. This determines the record to be retrieved.

    For this method to be called, the underlying database must be of type Btree, and it must have been configured to support record numbers.

    If this method fails for any reason, the position of the cursor will be -unchanged. -

    -

    -
    Parameters:
    key - the key +unchanged.
    +
    Parameters:
    key - the key returned as output. Its byte array does not need to be initialized by the -caller.
    data - the data +caller.
    data - the data returned as output. Multiple results can be retrieved by passing an object -that is a subclass of MultipleEntry, otherwise its byte array does not -need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used. -
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is -found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS. -
    Throws: -
    NullPointerException - if a DatabaseEntry parameter is null or +that is a subclass of MultipleEntry, otherwise its byte array does not +need to be initialized by the caller.
    lockMode - the locking attributes; if null, default attributes are used.
    +
    Returns:
    OperationStatus.NOTFOUND if no matching key/data pair is +found; OperationStatus.KEYEMPTY if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, OperationStatus.SUCCESS.
    +
    Throws:
    +
    java.lang.NullPointerException - if a DatabaseEntry parameter is null or does not contain a required non-null byte array. -

    -

    DeadlockException - if the operation was selected to resolve a +

    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs. -

    - - -
    - -

    -put

    -
    -public OperationStatus put(DatabaseEntry key,
    -                           DatabaseEntry data)
    -                    throws DatabaseException
    -
    -
    Store a key/data pair into the database. +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs. +

    +
  • +
+ + + +
    +
  • +

    put

    +
    public OperationStatus put(DatabaseEntry key,
    +                  DatabaseEntry data)
    +                    throws DatabaseException
    +
    Store a key/data pair into the database.

    If the put method succeeds, the cursor is always positioned to refer to the newly inserted item. If the put method fails for any reason, the @@ -1331,32 +1228,30 @@ If the key already appears in the database and duplicates are supported, the new data value is inserted at the correct sorted location. If the key already appears in the database and duplicates are not supported, the existing key/data pair will be replaced. +

    +
    Parameters:
    key - the key DatabaseEntry operated on. +

    data - the data DatabaseEntry stored.

    -

    -

    -
    Parameters:
    key - the key DatabaseEntry operated on. -

    data - the data DatabaseEntry stored. -

    -

    -

    Throws: -
    DeadlockException - if the operation was selected to resolve a +

    +
    Throws:
    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs.
    -
    -
    -
    - -

    -putAfter

    -
    -public OperationStatus putAfter(DatabaseEntry key,
    -                                DatabaseEntry data)
    -                         throws DatabaseException
    -
    -
    Store a key/data pair into the database. +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + + + + + + + + + + + + + + + + + + + + + +
    +
  • +

    putNoDupData

    +
    public OperationStatus putNoDupData(DatabaseEntry key,
    +                           DatabaseEntry data)
    +                             throws DatabaseException
    +
    Store a key/data pair into the database.

    If the putNoDupData method succeeds, the cursor is always positioned to refer to the newly inserted item. If the putNoDupData method fails for any reason, the @@ -1584,37 +1469,35 @@ state of the cursor will be unchanged. In the case of the Btree and Hash access methods, insert the specified key/data pair into the database, unless a key/data pair comparing equally to it already exists in the database. If a matching -key/data pair already exists in the database, OperationStatus.KEYEXIST is returned. +key/data pair already exists in the database, OperationStatus.KEYEXIST is returned.

    This method may only be called if the underlying database has been configured to support sorted duplicate data items.

    This method may not be called for the Queue or Recno access methods. +

    +
    Parameters:
    key - the key DatabaseEntry operated on. +

    data - the data DatabaseEntry stored.

    -

    -

    -
    Parameters:
    key - the key DatabaseEntry operated on. -

    data - the data DatabaseEntry stored. -

    -

    -

    Throws: -
    DeadlockException - if the operation was selected to resolve a +

    +
    Throws:
    +
    DeadlockException - if the operation was selected to resolve a deadlock. -

    -

    IllegalArgumentException - if an invalid parameter was specified. -

    -

    DatabaseException - if a failure occurs.
    -
    -
    -
    - -

    -putCurrent

    -
    -public OperationStatus putCurrent(DatabaseEntry data)
    -                           throws DatabaseException
    -
    -
    Replaces the data in the key/data pair at the current cursor position. +

    +
    java.lang.IllegalArgumentException - if an invalid parameter was specified. +

    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + +
    +
  • +

    putCurrent

    +
    public OperationStatus putCurrent(DatabaseEntry data)
    +                           throws DatabaseException
    +
    Replaces the data in the key/data pair at the current cursor position.

    Whether the putCurrent method succeeds or fails for any reason, the state of the cursor will be unchanged. @@ -1627,58 +1510,53 @@ public DatabaseConfig.setDuplicateComparator(java.util.Comparator). + more information on partial comparators see DatabaseConfig.setDuplicateComparator(java.util.Comparator).

    If the old and new data are unequal according to the comparator, a DatabaseException is thrown. Changing the data in this case would change the sort order of the record, which would change the cursor position, and this is not allowed. To change the sort order of a record, delete it and then re-insert it. -

    -

    -

    -
    Parameters:
    data - the data DatabaseEntry stored. -
    -
    Throws: -
    DeadlockException - - if the operation was selected to resolve a +

    +
    Parameters:
    data - the data DatabaseEntry stored. +
    +
    Throws:
    +
    DeadlockException - - if the operation was selected to resolve a deadlock. -
    -
    IllegalArgumentException - - if an invalid parameter was specified. -
    -
    DatabaseException - - if the old and new data are not equal according +
    +
    java.lang.IllegalArgumentException - - if an invalid parameter was specified. +
    +
    DatabaseException - - if the old and new data are not equal according to the configured duplicate comparator or default comparator, or if a failure occurs. -
    - - -
    - -

    -getPriority

    -
    -public CacheFilePriority getPriority()
    -                              throws DatabaseException
    -
    -
    Get the cache priority for pages referenced by the cursor. +
    +
  • +
+ + + + + + + +
    +
  • +

    setPriority

    +
    public void setPriority(CacheFilePriority priority)
    +                 throws DatabaseException
    +
    Set the cache priority for pages referenced by the DBC handle.

    The priority of a page biases the replacement algorithm to be more or less likely to discard a page when space is needed in the buffer pool. The bias @@ -1687,75 +1565,98 @@ public void setPriority(DatabaseException - if a failure occurs. - - +

    +
    Throws:
    +
    DatabaseException - if a failure occurs.
    +
  • +
+ + + +
    +
  • +

    openDatabaseStream

    +
    public DatabaseStream openDatabaseStream(DatabaseStreamConfig config)
    +                                  throws DatabaseException
    +
    Return a database stream pointing to a key/data pair where the data item + is a blob. +

    +
    Parameters:
    config - The database stream attributes. If null, default attributes are used. +

    +
    Returns:
    A database stream. +

    +
    Throws:
    +
    DatabaseException - if the data item is not a blob.
    +
  • +
+ + + + +
+
-
- - - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved. - - +

Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.

+ + -- cgit v1.2.1