• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/java/src/com/sleepycat/db/
1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 1999,2008 Oracle.  All rights reserved.
5 *
6 * $Id: PreparedTransaction.java,v 12.7 2008/01/17 05:04:53 mjc Exp $
7 */
8package com.sleepycat.db;
9
10import com.sleepycat.db.internal.DbTxn;
11
12/**
13The PreparedTransaction object is used to encapsulate a single prepared,
14but not yet resolved, transaction.
15*/
16public class PreparedTransaction {
17    private byte[] gid;
18    private Transaction txn;
19
20    PreparedTransaction(final DbTxn txn, final byte[] gid) {
21        this.txn = new Transaction(txn);
22        this.gid = gid;
23    }
24
25    public byte[] getGID() {
26        return gid;
27    }
28
29    /**
30    Return the transaction handle for the transaction.
31    <p>
32    @return
33    The transaction handle for the transaction.
34    */
35    public Transaction getTransaction() {
36        return txn;
37    }
38}
39