public void clearCache() { for(ReadRowSet rowSet : cache.values()) { rowSet.setCloseDelay(0); } cache.clear(); }
/** * Remove cached ResultSet * @param tableReference table identifier */ public void removeCache(String tableReference) { if(!cache.containsKey(tableReference)) { // Try with removing public schema if(TableLocation.parse(tableReference).getSchema().equalsIgnoreCase("public")) { tableReference = TableLocation.parse(tableReference).getTable(); } } ReadRowSet removedCache = cache.remove(tableReference); if(removedCache != null) { removedCache.setCloseDelay(0); } }
readRowSet.setCloseDelay(ROWSET_FREE_DELAY); readRowSet.setFetchDirection(ResultSet.FETCH_FORWARD); readRowSet.initialize(tableRef, integerPK, pm);