jdk/src/java.sql/share/classes/javax/transaction/xa/Xid.java
changeset 28298 7fca67ba0b9f
child 44256 12050b22e372
equal deleted inserted replaced
28297:8026b261bfdb 28298:7fca67ba0b9f
       
     1 /*
       
     2  * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.  Oracle designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Oracle in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22  * or visit www.oracle.com if you need additional information or have any
       
    23  * questions.
       
    24  */
       
    25 
       
    26 package javax.transaction.xa;
       
    27 
       
    28 /**
       
    29  * The Xid interface is a Java mapping of the X/Open transaction identifier
       
    30  * XID structure. This interface specifies three accessor methods to
       
    31  * retrieve a global transaction format ID, global transaction ID,
       
    32  * and branch qualifier. The Xid interface is used by the transaction
       
    33  * manager and the resource managers. This interface is not visible to
       
    34  * the application programs.
       
    35  */
       
    36 public interface Xid {
       
    37 
       
    38     /**
       
    39      * Maximum number of bytes returned by getGtrid.
       
    40      */
       
    41     final static int MAXGTRIDSIZE = 64;
       
    42 
       
    43     /**
       
    44      * Maximum number of bytes returned by getBqual.
       
    45      */
       
    46     final static int MAXBQUALSIZE = 64;
       
    47 
       
    48     /**
       
    49      * Obtain the format identifier part of the XID.
       
    50      *
       
    51      * @return Format identifier. O means the OSI CCR format.
       
    52      */
       
    53     int getFormatId();
       
    54 
       
    55     /**
       
    56      * Obtain the global transaction identifier part of XID as an array
       
    57      * of bytes.
       
    58      *
       
    59      * @return Global transaction identifier.
       
    60      */
       
    61     byte[] getGlobalTransactionId();
       
    62 
       
    63     /**
       
    64      * Obtain the transaction branch identifier part of XID as an array
       
    65      * of bytes.
       
    66      *
       
    67      * @return Global transaction identifier.
       
    68      */
       
    69     byte[] getBranchQualifier();
       
    70 }