comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 214:b8c007e86694

Improve readability
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 29 Mar 2018 18:44:54 +0200 (2018-03-29)
parents c38d4eaf5479
children 71b039bc2d99
comparison
equal deleted inserted replaced
213:115f6351bf4b 214:b8c007e86694
2142 2142
2143 int block = (row - blockOffset) / cacheSize; 2143 int block = (row - blockOffset) / cacheSize;
2144 int blockLine = (row - blockOffset) % cacheSize; 2144 int blockLine = (row - blockOffset) % cacheSize;
2145 2145
2146 // do we have the right block loaded? (optimistic try) 2146 // do we have the right block loaded? (optimistic try)
2147 DataBlockResponse rawr; 2147 DataBlockResponse rawr = resultBlocks[block];
2148 // load block if appropriate 2148 if (rawr == null) {
2149 if ((rawr = resultBlocks[block]) == null) { 2149 // load block
2150 /// TODO: ponder about a maximum number of blocks to keep 2150 /// TODO: ponder about a maximum number of blocks to keep
2151 /// in memory when dealing with random access to 2151 /// in memory when dealing with random access to
2152 /// reduce memory blow-up 2152 /// reduce memory blow-up
2153 2153
2154 // if we're running forward only, we can discard the old 2154 // if we're running forward only, we can discard the old