Class Hierarchy Previous Next Index
Class COM.cloudscape.vti.LockTable
java.lang.Object
|
+----COM.cloudscape.vti.VTITemplate
|
+----COM.cloudscape.vti.LockTable
- public class LockTable
- extends VTITemplate
- implements VTICosting
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.
LockTable is a virtual table which shows all the locks currently held in
the database. This virtual table can be invoked by calling it directly
select * from new COM.cloudscape.vti.LockTable() t;
or through the system alias TransactionTable
select * from new LockTable() t;
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:
- XID varchar(10) - the transaction id, this can be joined with the
TransactionTable virtual table's XID.
- TYPE varchar(5) - the type of lock, ROW, TABLE, or LATCH
- MODE varchar(4) - the mode of the lock, "S", "U", "X", "IS", "IX".
- S is shared lock (N/A to Latch)
- U is update lock (N/A to Latch)
- X is exclusive lock
- IS is intent shared lock (N/A to Latch or Row lock)
- IX is intent exclusive lock (N/A to Latch or Row lock)
- TABLENAME varchar(30) - the name of the base table the lock is for
- LOCKNAME varchar(20) - the name of the lock
- STATE varchar(5) - GRANT or WAIT
- TABLETYPE varchar(9) - 'T' for user table, 'S' for system table
- LOCKCOUNT varchar(5) - internal lock count.
- INDEXNAME varchar(30) - normally null. If non-null, a lock is held on
the index, this can only happen if this is not a user transaction.
ALL- return all locks and latches
LATCH- return only latches
TABLE_AND_ROWLOCK- return only table and row locks
LockTable()
- The normal way of instantiating a LockTable, equivalent to
LockTable(COM.cloudscape.vti.LockTable->TABLE_AND_ROWLOCK).
LockTable(int)
- This call is intrusive and should only be used under the supervision of
cloudscape tech support.
close()
-
getEstimatedCostPerInstantiation(VTIEnvironment)
-
getEstimatedRowCount(VTIEnvironment)
-
getMetaData()
-
getString(int)
- All columns in TransactionTable VTI are of String type.
next()
-
supportsMultipleInstantiations(VTIEnvironment)
-
wasNull()
-
LATCH
public static final int LATCH
return only latches
TABLE_AND_ROWLOCK
public static final int TABLE_AND_ROWLOCK
return only table and row locks
ALL
public static final int ALL
return all locks and latches
LockTable
public LockTable()
The normal way of instantiating a LockTable, equivalent to
LockTable(COM.cloudscape.vti.LockTable->TABLE_AND_ROWLOCK).
Only shows row and table lock and not latches. Latches are generally
held for very short duration and are not of interest to cloudscape
users. Only under abnormal circumstances will one be interested in
looking at latches.
LockTable
public LockTable(int flag)
This call is intrusive and should only be used under the supervision of
cloudscape tech support. Create an instance of the lock table which
has transient latches as well as locks.
getMetaData
public java.sql.ResultSetMetaData getMetaData()
- See Also:
- getMetaData
next
public boolean next() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - if no transaction context can be found, or other
cloudscape internal errors are encountered.
- See Also:
- next
close
public void close()
- See Also:
- close
getString
public java.lang.String getString(int columnNumber)
All columns in TransactionTable VTI are of String type.
- Overrides:
- getString in class VTITemplate
- See Also:
- getString
wasNull
public boolean wasNull()
- Overrides:
- wasNull in class VTITemplate
- See Also:
- wasNull
getEstimatedRowCount
public double getEstimatedRowCount(VTIEnvironment vtiEnvironment)
- See Also:
- getEstimatedRowCount
getEstimatedCostPerInstantiation
public double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
- See Also:
- getEstimatedCostPerInstantiation
supportsMultipleInstantiations
public boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
- Returns:
- false
- See Also:
- supportsMultipleInstantiations
Class Hierarchy Previous Next Index