org.apache.derby.impl.services.locks
Class Timeout

java.lang.Object
  extended by org.apache.derby.impl.services.locks.Timeout

public final class Timeout
extends java.lang.Object

Code to support Timeout error output.


Field Summary
static int ALL
           
private static java.lang.String[] column
           
private  Latch currentLock
           
private  java.util.Hashtable currentRow
           
private  long currentTime
           
private static int LENGTHOFTABLE
           
private static char LINE
           
private  java.util.Enumeration lockTable
           
static java.lang.String newline
           
private  char[] outputRow
           
private  java.lang.StringBuffer sb
           
private static char SEPARATOR
           
private  TableNameInfo tabInfo
           
static int TABLE_AND_ROWLOCK
           
private  TransactionController tc
           
 
Constructor Summary
private Timeout(Latch myTimeoutLock, java.util.Enumeration myLockTable, long time)
          Constructor
 
Method Summary
(package private) static StandardException buildException(Latch timeoutLock, java.util.Enumeration table, long time)
          The static entry way to get the LockTable in the system.
private  java.lang.String buildLockTableString()
          buildLockTableString creates a LockTable info String
static java.lang.String buildString(java.util.Enumeration table, long time)
           
private  void cpArray(java.lang.String toCp, int start, int end)
          cpArray helps built the output string (outputRow).
private  StandardException createException()
          createException creates a StandardException based on: currentLock a snapshot of the lockTable
private  void dumpLock()
          dumpLock puts information about currentLock into currentRow for output later.
private  boolean timeoutInfoHash()
          Copies the needed information from currentRow into the StringBuffer for output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_AND_ROWLOCK

public static final int TABLE_AND_ROWLOCK
See Also:
Constant Field Values

ALL

public static final int ALL
See Also:
Constant Field Values

newline

public static final java.lang.String newline
See Also:
Constant Field Values

tc

private TransactionController tc

tabInfo

private TableNameInfo tabInfo

currentLock

private Latch currentLock

outputRow

private char[] outputRow

sb

private java.lang.StringBuffer sb

currentRow

private java.util.Hashtable currentRow

currentTime

private final long currentTime

lockTable

private final java.util.Enumeration lockTable

column

private static final java.lang.String[] column

LENGTHOFTABLE

private static final int LENGTHOFTABLE

LINE

private static final char LINE
See Also:
Constant Field Values

SEPARATOR

private static final char SEPARATOR
See Also:
Constant Field Values
Constructor Detail

Timeout

private Timeout(Latch myTimeoutLock,
                java.util.Enumeration myLockTable,
                long time)
Constructor

Parameters:
myTimeoutLock - The Latch that the timeout happened on
myLockTable -
time - The time when the lockTable was cloned.
Method Detail

createException

private StandardException createException()
createException creates a StandardException based on: currentLock a snapshot of the lockTable

Returns:
StandardException The exception with the lockTable snapshot in it

buildLockTableString

private java.lang.String buildLockTableString()
                                       throws StandardException
buildLockTableString creates a LockTable info String

Throws:
StandardException

buildException

static StandardException buildException(Latch timeoutLock,
                                        java.util.Enumeration table,
                                        long time)
The static entry way to get the LockTable in the system.

Parameters:
timeoutLock - The Latch that the timeout happened on
table - The lockTable
time - The time when the lockTable was cloned
Returns:
StandardException The exception with the lockTable snapshot in it

buildString

public static java.lang.String buildString(java.util.Enumeration table,
                                           long time)
                                    throws StandardException
Throws:
StandardException

dumpLock

private void dumpLock()
               throws StandardException
dumpLock puts information about currentLock into currentRow for output later.

Throws:
StandardException

cpArray

private void cpArray(java.lang.String toCp,
                     int start,
                     int end)
cpArray helps built the output string (outputRow).

Parameters:
toCp - the String to be copied into outputRow
start - the start place
end - the end place

timeoutInfoHash

private boolean timeoutInfoHash()
Copies the needed information from currentRow into the StringBuffer for output

Returns:
true if successful

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.