Top Description Fields Constructors Methods
org.apache.derby.impl.services.locks

public final Class Timeout

extends Object
Class Inheritance
Imports
org.apache.derby.iapi.services.context.ContextService, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.locks.Latch, .Lockable, .VirtualLockTable, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.store.access.TransactionController, java.util.Date, .Enumeration, .Hashtable

Code to support Timeout error output.

Field Summary

Modifier and TypeField and Description
public static final int
private static final String[]
private Latch
private Hashtable<K, V>
private final long
private static final int
private static final char
private final Enumeration<E>
public static final String
private char[]
private StringBuffer
private static final char
private TableNameInfo
public static final int
private TransactionController

Constructor Summary

AccessConstructor and Description
private
Timeout(Latch
The Latch that the timeout happened on
myTimeoutLock
,
Enumeration<E> myLockTable, long
The time when the lockTable was cloned.
time
)

Constructor

Method Summary

Modifier and TypeMethod and Description
pack-priv static StandardException

Returns:

StandardException The exception with the lockTable snapshot in it
buildException
(Latch
The Latch that the timeout happened on
timeoutLock
,
Enumeration<E>
The lockTable
table
,
long
The time when the lockTable was cloned
time
)

The static entry way to get the LockTable in the system.

private String
buildLockTableString()

buildLockTableString creates a LockTable info String

public static String
buildString(Enumeration<E> table, long time)

private void
cpArray(String
the String to be copied into outputRow
toCp
,
int
the start place
start
,
int
the end place
end
)

cpArray helps built the output string (outputRow).

private StandardException

Returns:

StandardException The exception with the lockTable snapshot in it
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

Returns:

true if successful
timeoutInfoHash
()

Copies the needed information from currentRow into the StringBuffer for output

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALLback to summary
public static final int ALL
columnback to summary
private static final String[] column
currentLockback to summary
private Latch currentLock
currentRowback to summary
private Hashtable<K, V> currentRow
currentTimeback to summary
private final long currentTime
LENGTHOFTABLEback to summary
private static final int LENGTHOFTABLE
LINEback to summary
private static final char LINE
lockTableback to summary
private final Enumeration<E> lockTable
newlineback to summary
public static final String newline
outputRowback to summary
private char[] outputRow
sbback to summary
private StringBuffer sb
SEPARATORback to summary
private static final char SEPARATOR
tabInfoback to summary
private TableNameInfo tabInfo
TABLE_AND_ROWLOCKback to summary
public static final int TABLE_AND_ROWLOCK
tcback to summary
private TransactionController tc

Constructor Detail

Timeoutback to summary
private Timeout(Latch myTimeoutLock, Enumeration<E> myLockTable, long time)

Constructor

Parameters
myTimeoutLock:Latch

The Latch that the timeout happened on

time:long

The time when the lockTable was cloned.

Method Detail

buildExceptionback to summary
pack-priv static StandardException buildException(Latch timeoutLock, Enumeration<E> table, long time)

The static entry way to get the LockTable in the system.

Parameters
timeoutLock:Latch

The Latch that the timeout happened on

table:Enumeration<E>

The lockTable

time:long

The time when the lockTable was cloned

Returns:StandardException

StandardException The exception with the lockTable snapshot in it

buildLockTableStringback to summary
private String buildLockTableString() throws StandardException

buildLockTableString creates a LockTable info String

buildStringback to summary
public static String buildString(Enumeration<E> table, long time) throws StandardException
cpArrayback to summary
private void cpArray(String toCp, int start, int end)

cpArray helps built the output string (outputRow).

Parameters
toCp:String

the String to be copied into outputRow

start:int

the start place

end:int

the end place

createExceptionback to summary
private StandardException createException()

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

Returns:StandardException

StandardException The exception with the lockTable snapshot in it

dumpLockback to summary
private void dumpLock() throws StandardException

dumpLock puts information about currentLock into currentRow for output later.

timeoutInfoHashback to summary
private boolean timeoutInfoHash()

Copies the needed information from currentRow into the StringBuffer for output

Returns:boolean

true if successful