Class Timeout
- java.lang.Object
-
- org.apache.derby.impl.services.locks.Timeout
-
public final class Timeout extends java.lang.Object
Code to support Timeout error output.
-
-
Field Summary
Fields Modifier and Type Field Description 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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (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 Stringstatic 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 lockTableprivate 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
-
-
-
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 onmyLockTable
-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 ontable
- The lockTabletime
- 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 outputRowstart
- the start placeend
- the end place
-
timeoutInfoHash
private boolean timeoutInfoHash()
Copies the needed information from currentRow into the StringBuffer for output- Returns:
- true if successful
-
-