~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/java/src/com/sleepycat/db/DbTxn.java

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*-
2
 
 * See the file LICENSE for redistribution information.
3
 
 *
4
 
 * Copyright (c) 1997-2002
5
 
 *      Sleepycat Software.  All rights reserved.
6
 
 *
7
 
 * $Id$
8
 
 */
9
 
 
10
 
package com.sleepycat.db;
11
 
 
12
 
/**
13
 
 *
14
 
 * @author Donald D. Anderson
15
 
 */
16
 
public class DbTxn
17
 
{
18
 
    // methods
19
 
    //
20
 
    public native void abort()
21
 
         throws DbException;
22
 
 
23
 
    public native void commit(int flags)
24
 
         throws DbException;
25
 
 
26
 
    public native void discard(int flags)
27
 
         throws DbException;
28
 
 
29
 
    public native /*u_int32_t*/ int id()
30
 
         throws DbException;
31
 
 
32
 
    public native void prepare(byte[] gid)
33
 
         throws DbException;
34
 
 
35
 
    public native void set_timeout(/*db_timeout_t*/ long timeout,
36
 
                                   /*u_int32_t*/ int flags)
37
 
        throws DbException;
38
 
 
39
 
    // We override Object.equals because it is possible for
40
 
    // the Java API to create multiple DbTxns that reference
41
 
    // the same underlying object.  This can happen for example
42
 
    // during DbEnv.txn_recover().
43
 
    //
44
 
    public boolean equals(Object obj)
45
 
    {
46
 
        if (this == obj)
47
 
            return true;
48
 
 
49
 
        if (obj != null && (obj instanceof DbTxn)) {
50
 
            DbTxn that = (DbTxn)obj;
51
 
            return (this.private_dbobj_ == that.private_dbobj_);
52
 
        }
53
 
        return false;
54
 
    }
55
 
 
56
 
    // We must override Object.hashCode whenever we override
57
 
    // Object.equals() to enforce the maxim that equal objects
58
 
    // have the same hashcode.
59
 
    //
60
 
    public int hashCode()
61
 
    {
62
 
        return ((int)private_dbobj_ ^ (int)(private_dbobj_ >> 32));
63
 
    }
64
 
 
65
 
    // get/set methods
66
 
    //
67
 
 
68
 
    // private data
69
 
    //
70
 
    private long private_dbobj_ = 0;
71
 
 
72
 
    static {
73
 
        Db.load_db();
74
 
    }
75
 
}
76
 
 
77
 
// end of DbTxn.java