Class Timeout
- java.lang.Object
-
- org.apache.derby.impl.services.locks.Timeout
-
public final class Timeout extends java.lang.ObjectCode to support Timeout error output.
-
-
Field Summary
Fields Modifier and Type Field Description static intALLprivate static java.lang.String[]columnprivate LatchcurrentLockprivate java.util.HashtablecurrentRowprivate longcurrentTimeprivate static intLENGTHOFTABLEprivate static charLINEprivate java.util.EnumerationlockTablestatic java.lang.Stringnewlineprivate char[]outputRowprivate java.lang.StringBuffersbprivate static charSEPARATORprivate TableNameInfotabInfostatic intTABLE_AND_ROWLOCKprivate TransactionControllertc
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static StandardExceptionbuildException(Latch timeoutLock, java.util.Enumeration table, long time)The static entry way to get the LockTable in the system.private java.lang.StringbuildLockTableString()buildLockTableString creates a LockTable info Stringstatic java.lang.StringbuildString(java.util.Enumeration table, long time)private voidcpArray(java.lang.String toCp, int start, int end)cpArray helps built the output string (outputRow).private StandardExceptioncreateException()createException creates a StandardException based on: currentLock a snapshot of the lockTableprivate voiddumpLock()dumpLock puts information about currentLock into currentRow for output later.private booleantimeoutInfoHash()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 StandardExceptionbuildLockTableString 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 StandardExceptiondumpLock 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
-
-