| | |
| | | } |
| | | |
| | | @Override |
| | | public void close() { |
| | | public void close() |
| | | { |
| | | executor.shutdown(); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private String getDnAsString() { |
| | | private String getDnAsString() |
| | | { |
| | | try |
| | | { |
| | | return id2entry.get(txn, new EntryID(delegate.getValue())).getName().toString(); |
| | |
| | | |
| | | private void throwIfOrphan(ByteString dn) throws DirectoryException |
| | | { |
| | | if (!parentExists(dn)) { |
| | | if (!parentExists(dn)) |
| | | { |
| | | throw new DirectoryException(NO_SUCH_OBJECT, ERR_IMPORT_PARENT_NOT_FOUND.get(getDnAsString())); |
| | | } |
| | | } |
| | |
| | | { |
| | | final List<EntryIDSet> idSets = new ArrayList<>(encodedIDSets.size()); |
| | | int mergedSize = 0; |
| | | for(ByteString encodedIDSet :encodedIDSets) { |
| | | for (ByteString encodedIDSet : encodedIDSets) |
| | | { |
| | | final EntryIDSet entryIDSet = index.decodeValue(ByteString.empty(), encodedIDSet); |
| | | mergedSize += entryIDSet.size(); |
| | | if (!entryIDSet.isDefined() || mergedSize >= indexLimit) |
| | |
| | | |
| | | final long[] entryIDs = new long[mergedSize]; |
| | | int offset = 0; |
| | | for(EntryIDSet idSet : idSets) { |
| | | for (EntryIDSet idSet : idSets) |
| | | { |
| | | offset += idSet.copyTo(entryIDs, offset); |
| | | } |
| | | Arrays.sort(entryIDs); |