Class Timeout
java.lang.Object
org.apache.derby.impl.services.locks.Timeout
Code to support Timeout error output.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final String[]private Latchprivate Hashtableprivate final longprivate static final intprivate static final charprivate final Enumerationstatic final Stringprivate char[]private StringBufferprivate static final charprivate TableNameInfostatic final intprivate TransactionController -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTimeout(Latch myTimeoutLock, Enumeration myLockTable, long time) Constructor -
Method Summary
Modifier and TypeMethodDescription(package private) static StandardExceptionbuildException(Latch timeoutLock, Enumeration table, long time) The static entry way to get the LockTable in the system.private StringbuildLockTableString creates a LockTable info Stringstatic StringbuildString(Enumeration table, long time) private voidcpArray helps built the output string (outputRow).private StandardExceptioncreateException creates a StandardException based on: currentLock a snapshot of the lockTableprivate voiddumpLock()dumpLock puts information about currentLock into currentRow for output later.private booleanCopies the needed information from currentRow into the StringBuffer for output
-
Field Details
-
TABLE_AND_ROWLOCK
public static final int TABLE_AND_ROWLOCK- See Also:
-
ALL
public static final int ALL- See Also:
-
newline
- See Also:
-
tc
-
tabInfo
-
currentLock
-
outputRow
private char[] outputRow -
sb
-
currentRow
-
currentTime
private final long currentTime -
lockTable
-
column
-
LENGTHOFTABLE
private static final int LENGTHOFTABLE -
LINE
private static final char LINE- See Also:
-
SEPARATOR
private static final char SEPARATOR- See Also:
-
-
Constructor Details
-
Timeout
Constructor- Parameters:
myTimeoutLock- The Latch that the timeout happened onmyLockTable-time- The time when the lockTable was cloned.
-
-
Method Details
-
createException
createException creates a StandardException based on: currentLock a snapshot of the lockTable- Returns:
- StandardException The exception with the lockTable snapshot in it
-
buildLockTableString
buildLockTableString creates a LockTable info String- Throws:
StandardException
-
buildException
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
- Throws:
StandardException
-
dumpLock
dumpLock puts information about currentLock into currentRow for output later.- Throws:
StandardException
-
cpArray
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
-