// statement was never added
return;
}
LongKeyIntValueHashMap scsMap =
(LongKeyIntValueHashMap) sessionUseMap.get(sessionID);
if (scsMap == null) {
// statement already removed due to invalidation
return;
}
int sessionUseCount = scsMap.get(csid, 0);
if (sessionUseCount == 0) {
// statement already removed due to invalidation
} else if (sessionUseCount == 1 || freeAll) {
scsMap.remove(csid);
int usecount = useMap.get(csid, 0);
if (usecount == 0) {
// statement already removed due to invalidation
} else if (usecount == 1) {
Statement cs = (Statement) csidMap.remove(csid);
if (cs != null) {
int schemaid = cs.getSchemalName().hashCode();
LongValueHashMap sqlMap =
(LongValueHashMap) schemaMap.get(schemaid);
String sql = (String) sqlLookup.remove(csid);
sqlMap.remove(sql);
}
useMap.remove(csid);
} else {
useMap.put(csid, usecount - 1);
}
} else {
scsMap.put(csid, sessionUseCount - 1);
}
}