use of org.apache.derby.iapi.services.locks.LockFactory in project derby by apache.
the class LockTable method next.
/**
* @see java.sql.ResultSet#next
* @exception SQLException if no transaction context can be found, or other
* Derby internal errors are encountered.
*/
public boolean next() throws SQLException {
try {
if (!initialized) {
LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC();
tc = lcc.getTransactionExecute();
LockFactory lf = tc.getAccessManager().getLockFactory();
lockTable = lf.makeVirtualLockTable();
initialized = true;
tabInfo = new TableNameInfo(lcc, true);
}
currentRow = null;
if (lockTable != null) {
while (lockTable.hasMoreElements() && (currentRow == null)) {
currentRow = dumpLock((Latch) lockTable.nextElement());
}
}
} catch (StandardException se) {
throw PublicAPI.wrapStandardException(se);
}
return (currentRow != null);
}
Aggregations