01: /*
02:
03: Derby - Class org.apache.derby.iapi.store.raw.GlobalTransactionId
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (the "License"); you may not use this file except in compliance with
10: the License. You may obtain a copy of the License at
11:
12: http://www.apache.org/licenses/LICENSE-2.0
13:
14: Unless required by applicable law or agreed to in writing, software
15: distributed under the License is distributed on an "AS IS" BASIS,
16: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: See the License for the specific language governing permissions and
18: limitations under the License.
19:
20: */
21:
22: package org.apache.derby.iapi.store.raw;
23:
24: import org.apache.derby.iapi.services.io.Formatable;
25:
26: /**
27: A transaction identifier that is unique among all raw stores and all
28: transactions
29:
30: The equals() method for TransactionId implements by value equality.
31:
32: MT - immutable
33: */
34: public interface GlobalTransactionId extends Formatable {
35: /**
36: * Obtain the format id part of the GlobalTransactionId.
37: * <p>
38: *
39: * @return Format identifier. O means the OSI CCR format.
40: **/
41: public int getFormat_Id();
42:
43: /**
44: * Obtain the global transaction identifier part of GlobalTransactionId
45: * as an array of bytes.
46: * <p>
47: *
48: * @return A byte array containing the global transaction identifier.
49: **/
50: public byte[] getGlobalTransactionId();
51:
52: /**
53: * Obtain the transaction branch qualifier part of the GlobalTransactionId
54: * in a byte array.
55: * <p>
56: *
57: * @return A byte array containing the branch qualifier of the transaction.
58: **/
59: public byte[] getBranchQualifier();
60:
61: /* need to write a value based HashCode() method. */
62: }
|