~ubuntu-branches/ubuntu/vivid/db/vivid-proposed

« back to all changes in this revision

Viewing changes to java/src/com/sleepycat/db/Cursor.java

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2010-04-04 09:37:47 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20100404093747-7x3j05svjdoy8tdi
Tags: upstream-5.0.21
ImportĀ upstreamĀ versionĀ 5.0.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*-
2
2
 * See the file LICENSE for redistribution information.
3
3
 *
4
 
 * Copyright (c) 2002-2009 Oracle.  All rights reserved.
 
4
 * Copyright (c) 2002, 2010 Oracle and/or its affiliates.  All rights reserved.
5
5
 *
6
6
 * $Id$
7
7
 */
24
24
transaction, the cursor must be opened and closed within the context of
25
25
that single transaction.
26
26
<p>
 
27
If you do not close the cursor before closing the database handle or the 
 
28
transaction handle that owns this cursor, then, closing a database 
 
29
handle or a transaction handle closes these open cursors.
27
30
Once the cursor close method has been called, the handle may not be
28
31
accessed again, regardless of the close method's success or failure.
29
32
<p>
64
67
        this.config = config;
65
68
    }
66
69
 
 
70
    /**
 
71
    Discard the cursor.
 
72
    <p>
 
73
    After the close method has been called, you cannot use the cursor handle
 
74
    again.
 
75
    <p>
 
76
    It is not required to close the cursor explicitly before closing the
 
77
    database handle or the transaction handle that owns this cursor because
 
78
    closing a database handle or transaction handle closes those open cursor.
 
79
    <p>
 
80
    However, it is recommended that you always close all cursor handles
 
81
    immediately after their use to promote concurrency and to release resources
 
82
    such as page locks.
 
83
    <p>
 
84
    @throws DeadlockException if the operation was selected to resolve a
 
85
    deadlock.  If the application is already intending to abort the transaction,
 
86
    this exception should be ignored, and the application should proceed. 
 
87
    <p>
 
88
    @throws DatabaseException if a failure occurs.
 
89
    */
67
90
    public synchronized void close()
68
91
        throws DatabaseException {
69
92
 
718
741
    }
719
742
 
720
743
    /**
721
 
    Move the cursor to the specified key and closest matching data item of the
722
 
database.
 
744
    Move the cursor to the specified key and matching data item of the database.
723
745
<p>
724
746
In the case of any database supporting sorted duplicate sets, the returned
725
747
key/data pair is for the smallest data item greater than or equal to the