|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.vti.VTITemplate
org.apache.derby.diag.LockTable
public class LockTable
LockTable is a virtual table that shows all locks currently held in the database. This virtual table can be invoked by calling it directly
select * from SYSCS_DIAG.LOCK_TABLE
The LockTable virtual table takes a snap shot of the lock table while the system is in flux, so it is possible that some locks may be in transition state while the snap shot is taken. We choose to do this rather then impose extranous timing restrictions so that the use of this tool will not alter the normal timing and flow of execution in the application.
The LockTable virtual table has the following columns:
Field Summary | |
---|---|
static int |
ALL
return all locks and latches |
private static ResultColumnDescriptor[] |
columnInfo
|
private java.util.Hashtable |
currentRow
|
private int |
flag
|
private boolean |
initialized
|
static int |
LATCH
return only latches |
private java.util.Enumeration |
lockTable
|
private static java.sql.ResultSetMetaData |
metadata
|
private TableNameInfo |
tabInfo
|
static int |
TABLE_AND_ROWLOCK
return only table and row locks |
private TransactionController |
tc
|
private boolean |
wasNull
|
Fields inherited from interface org.apache.derby.vti.VTICosting |
---|
defaultEstimatedCost, defaultEstimatedRowCount |
Fields inherited from interface java.sql.ResultSet |
---|
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE |
Constructor Summary | |
---|---|
LockTable()
The normal way of instantiating a LockTable, equivalent to LockTable(org.apache.derby.diag.LockTable->TABLE_AND_ROWLOCK). |
|
LockTable(int flag)
This call is intrusive and should only be used under the supervision of technical support. |
Method Summary | |
---|---|
void |
close()
|
private java.util.Hashtable |
dumpLock(Latch lock)
Convert the lock information into a hashtable. |
double |
getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
Get the estimated cost for a single instantiation of a Table Function. |
double |
getEstimatedRowCount(VTIEnvironment vtiEnvironment)
Get the estimated row count for a single scan of a Table Function. |
java.sql.ResultSetMetaData |
getMetaData()
|
java.lang.String |
getString(int columnNumber)
All columns in TransactionTable VTI are of String type. |
boolean |
next()
|
boolean |
supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
Find out if the ResultSet of the Table Function can be instantiated multiple times. |
boolean |
wasNull()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.ResultSet |
---|
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, isClosed, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateRowId, updateRowId, updateSQLXML, updateSQLXML |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
public static final int LATCH
public static final int TABLE_AND_ROWLOCK
public static final int ALL
private TransactionController tc
private java.util.Hashtable currentRow
private java.util.Enumeration lockTable
private boolean wasNull
private boolean initialized
private final int flag
private TableNameInfo tabInfo
private static final ResultColumnDescriptor[] columnInfo
private static final java.sql.ResultSetMetaData metadata
Constructor Detail |
---|
public LockTable()
public LockTable(int flag)
Method Detail |
---|
public java.sql.ResultSetMetaData getMetaData()
getMetaData
in interface java.sql.ResultSet
ResultSet.getMetaData()
public boolean next() throws java.sql.SQLException
next
in interface java.sql.ResultSet
java.sql.SQLException
- if no transaction context can be found, or other
Derby internal errors are encountered.ResultSet.next()
public void close()
close
in interface java.sql.ResultSet
ResultSet.close()
public java.lang.String getString(int columnNumber)
getString
in interface java.sql.ResultSet
getString
in class VTITemplate
ResultSet.getString(int)
public boolean wasNull()
wasNull
in interface java.sql.ResultSet
wasNull
in class VTITemplate
ResultSet.wasNull()
public double getEstimatedRowCount(VTIEnvironment vtiEnvironment)
VTICosting
getEstimatedRowCount
in interface VTICosting
vtiEnvironment
- The state variable for optimizing the Table Function.
VTICosting.getEstimatedRowCount(org.apache.derby.vti.VTIEnvironment)
public double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
VTICosting
getEstimatedCostPerInstantiation
in interface VTICosting
vtiEnvironment
- The state variable for optimizing the Table Function.
VTICosting.getEstimatedCostPerInstantiation(org.apache.derby.vti.VTIEnvironment)
public boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
VTICosting
supportsMultipleInstantiations
in interface VTICosting
vtiEnvironment
- The state variable for optimizing the Table Function.
VTICosting.supportsMultipleInstantiations(org.apache.derby.vti.VTIEnvironment)
private java.util.Hashtable dumpLock(Latch lock) throws StandardException
StandardException
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |