/** * Call is done. Execution happened and we returned results to client. It is * now safe to cleanup. */ @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "IS2_INCONSISTENT_SYNC", justification = "Presume the lock on processing request held by caller is protection enough") @Override public void done() { if (this.cellBlockStream != null) { // This will return back the BBs which we got from pool. this.cellBlockStream.releaseResources(); this.cellBlockStream = null; } // If the call was run successfuly, we might have already returned the BB // back to pool. No worries..Then inputCellBlock will be null cleanup(); }
encodeCellsTo(bbos, cellScanner, codec, compressor); if (bbos.size() == 0) { bbos.releaseResources(); return null;
assertEquals(4, b4.remaining()); assertEquals(124, b4.getInt()); bbos.releaseResources(); assertEquals(3, pool.getQueueSize());
encodeCellsTo(bbos, cellScanner, codec, compressor); if (bbos.size() == 0) { bbos.releaseResources(); return null;
encodeCellsTo(bbos, cellScanner, codec, compressor); if (bbos.size() == 0) { bbos.releaseResources(); return null;
assertEquals(4, b4.remaining()); assertEquals(124, b4.getInt()); bbos.releaseResources(); assertEquals(3, pool.getQueueSize());
assertEquals(4, b4.remaining()); assertEquals(124, b4.getInt()); bbos.releaseResources(); assertEquals(3, pool.getQueueSize());