Top Description Fields Constructors Methods
org.apache.derby.iapi.store.access

public abstract Class GlobalXact

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.derby.iapi.store.access.xa.XAXactId, org.apache.derby.impl.store.raw.xact.GlobalXactId

This abstract class represents a global transaction id which can be tested for equality against other transaction ids, which can be hashed into a hash table, and which can be output as a string.

This class has 2 direct subclasses.

The main reason for this class is to ensure that equality etc. works in a consistent way across both subclasses.

Field Summary

Modifier and TypeField and Description
protected byte[]
protected int
format_id

Protected Fields of the class

protected byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Provide a hashCode which is compatable with the equals() method.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

branch_idback to summary
protected byte[] branch_id
format_idback to summary
protected int format_id

Protected Fields of the class

global_idback to summary
protected byte[] global_id

Constructor Detail

GlobalXactback to summary
public GlobalXact()

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
other:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Provide a hashCode which is compatable with the equals() method.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object

See Also
java.lang.Object#hashCode
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object