| | |
| | | } |
| | | finally |
| | | { |
| | | StaticUtils.close(reader); |
| | | close(reader); |
| | | if (!skipDNValidation) |
| | | { |
| | | try |
| | |
| | | } |
| | | finally |
| | | { |
| | | cursor.close(); |
| | | close(cursor); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | cursor.close(); |
| | | close(cursor); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (bufferFile != null) |
| | | { |
| | | try |
| | | { |
| | | bufferFile.close(); |
| | | } |
| | | catch (IOException ignored) |
| | | { |
| | | // Ignore. |
| | | } |
| | | } |
| | | |
| | | if (bufferIndexFile != null) |
| | | { |
| | | try |
| | | { |
| | | bufferIndexFile.close(); |
| | | } |
| | | catch (IOException ignored) |
| | | { |
| | | // Ignore. |
| | | } |
| | | } |
| | | close(bufferFile, bufferIndexFile); |
| | | |
| | | indexMgr.getBufferFile().delete(); |
| | | indexMgr.getBufferIndexFile().delete(); |
| | |
| | | } |
| | | finally |
| | | { |
| | | bufferStream.close(); |
| | | bufferIndexStream.close(); |
| | | close(bufferStream, bufferIndexStream); |
| | | indexMgr.setBufferInfo(bufferCount, indexMgr.getBufferFile().length()); |
| | | } |
| | | return null; |
| | |
| | | entriesProcessed.getAndIncrement(); |
| | | } |
| | | flushIndexBuffers(); |
| | | cursor.close(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | finally |
| | | { |
| | | cursor.close(); |
| | | close(cursor); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (cursor != null) |
| | | { |
| | | cursor.close(); |
| | | } |
| | | close(cursor); |
| | | } |
| | | return inserted; |
| | | } |
| | |
| | | OperationStatus status = cursor.putCurrent(newVal); |
| | | if (status != OperationStatus.SUCCESS) |
| | | { |
| | | LocalizableMessage message = |
| | | LocalizableMessage.raw("Add of DN to DN cache failed."); |
| | | throw new JebException(message); |
| | | throw new JebException(LocalizableMessage.raw("Add of DN to DN cache failed.")); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (cursor != null) |
| | | { |
| | | cursor.close(); |
| | | } |
| | | close(cursor); |
| | | } |
| | | return dnExists; |
| | | } |