2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 1997-2002
5
* Sleepycat Software. All rights reserved.
10
package com.sleepycat.db;
14
* @author Donald D. Anderson
20
public native void abort()
23
public native void commit(int flags)
26
public native void discard(int flags)
29
public native /*u_int32_t*/ int id()
32
public native void prepare(byte[] gid)
35
public native void set_timeout(/*db_timeout_t*/ long timeout,
36
/*u_int32_t*/ int flags)
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().
44
public boolean equals(Object obj)
49
if (obj != null && (obj instanceof DbTxn)) {
50
DbTxn that = (DbTxn)obj;
51
return (this.private_dbobj_ == that.private_dbobj_);
56
// We must override Object.hashCode whenever we override
57
// Object.equals() to enforce the maxim that equal objects
58
// have the same hashcode.
62
return ((int)private_dbobj_ ^ (int)(private_dbobj_ >> 32));
70
private long private_dbobj_ = 0;