public void close() { if (_state != CLOSED) { free(); _state = CLOSED; } }
public void close() { if (_state != CLOSED) { free(); _state = CLOSED; } }
public void close() { if (_state != CLOSED) { free(); _state = CLOSED; } }
public void close() { if (_state != CLOSED) { free(); _state = CLOSED; } }
/** * Check to see if the soft map is the same size as all the * rows in the Result: if so, we copy over the values to a * hard reference HashSet and close the Result object associated with * this endeavour. */ private void checkComplete() { // only check if we've actually gotten the size for some reason already if (_size == -1 || _rows.size() != _size) return; Object[] full = new Object[_size]; int count = 0; Integer key; for (Iterator itr = _rows.keySet().iterator(); itr.hasNext(); count++) { key = (Integer) itr.next(); full[key.intValue()] = _rows.get(key); } // double-check, in case any of the soft references were // cleaned up between the time we checked the size and the // time we completed the copy to the hard reference map if (count == _size) { _full = full; free(); } }
/** * Check to see if the soft map is the same size as all the * rows in the Result: if so, we copy over the values to a * hard reference HashSet and close the Result object associated with * this endeavour. */ private void checkComplete() { // only check if we've actually gotten the size for some reason already if (_size == -1 || _rows.size() != _size) return; Object[] full = new Object[_size]; int count = 0; Integer key; for (Iterator itr = _rows.keySet().iterator(); itr.hasNext(); count++) { key = (Integer) itr.next(); full[key.intValue()] = _rows.get(key); } // double-check, in case any of the soft references were // cleaned up between the time we checked the size and the // time we completed the copy to the hard reference map if (count == _size) { _full = full; free(); } }
/** * Check to see if the soft map is the same size as all the * rows in the Result: if so, we copy over the values to a * hard reference HashSet and close the Result object associated with * this endeavour. */ private void checkComplete() { // only check if we've actually gotten the size for some reason already if (_size == -1 || _rows.size() != _size) return; Object[] full = new Object[_size]; int count = 0; Integer key; for (Iterator itr = _rows.keySet().iterator(); itr.hasNext(); count++) { key = (Integer) itr.next(); full[key.intValue()] = _rows.get(key); } // double-check, in case any of the soft references were // cleaned up between the time we checked the size and the // time we completed the copy to the hard reference map if (count == _size) { _full = full; free(); } }
/** * Check to see if the soft map is the same size as all the * rows in the Result: if so, we copy over the values to a * hard reference HashSet and close the Result object associated with * this endeavour. */ private void checkComplete() { // only check if we've actually gotten the size for some reason already if (_size == -1 || _rows.size() != _size) return; Object[] full = new Object[_size]; int count = 0; Integer key; for (Iterator itr = _rows.keySet().iterator(); itr.hasNext(); count++) { key = (Integer) itr.next(); full[key.intValue()] = _rows.get(key); } // double-check, in case any of the soft references were // cleaned up between the time we checked the size and the // time we completed the copy to the hard reference map if (count == _size) { _full = full; free(); } }