com.sun.jini.outrigger
Class TxnTable.Key

java.lang.Object
  extended by com.sun.jini.outrigger.TxnTable.Key
Enclosing class:
TxnTable

private class TxnTable.Key
extends Object

Key class for the primary map (from manager/id pairs to Txn s. We use a new class instead of ServerTransaction objects so we can make sure we don't call equals on unprepared managers.


Field Summary
private  long id
          The id for the transaction
private  TransactionManager manager
          The manager for the transaction
private  boolean prepared
          True if it has been asserted that manager has been prepared.
 
Constructor Summary
private TxnTable.Key(TransactionManager manager, long id, boolean prepared)
          Create a new key from the specified manager and id.
 
Method Summary
 boolean equals(Object other)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

private final TransactionManager manager
The manager for the transaction


id

private final long id
The id for the transaction


prepared

private final boolean prepared
True if it has been asserted that manager has been prepared. Note, we only put Keys in the table that have this flag set.

Constructor Detail

TxnTable.Key

private TxnTable.Key(TransactionManager manager,
                     long id,
                     boolean prepared)
Create a new key from the specified manager and id.

Parameters:
manager - the manager for the transaction
id - the id for the transaction
prepared - should be true if the manager has been prepared and false otherwise
Throws:
NullPointerException - if manager is null.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.