Class Timeout
java.lang.Object
org.apache.derby.impl.services.locks.Timeout
Code to support Timeout error output.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private static final String[]
private Latch
private Hashtable
private final long
private static final int
private static final char
private final Enumeration
static final String
private char[]
private StringBuffer
private static final char
private TableNameInfo
static final int
private TransactionController
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Timeout
(Latch myTimeoutLock, Enumeration myLockTable, long time) Constructor -
Method Summary
Modifier and TypeMethodDescription(package private) static StandardException
buildException
(Latch timeoutLock, Enumeration table, long time) The static entry way to get the LockTable in the system.private String
buildLockTableString creates a LockTable info Stringstatic String
buildString
(Enumeration table, long time) private void
cpArray helps built the output string (outputRow).private StandardException
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
Copies 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
-