| | |
| | | * during and import to support multiple suffixes in a backend. A rebuild |
| | | * index has only one of these instances. |
| | | */ |
| | | @SuppressWarnings("javadoc") |
| | | final class Suffix |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | |
| | | * |
| | | * @return A DN2ID instance that can be used to manipulate the DN2ID tree. |
| | | */ |
| | | public DN2ID getDN2ID() |
| | | DN2ID getDN2ID() |
| | | { |
| | | return entryContainer.getDN2ID(); |
| | | } |
| | |
| | | * |
| | | * @return A ID2Entry instance that can be used to manipulate the ID2Entry tree. |
| | | */ |
| | | public ID2Entry getID2Entry() |
| | | ID2Entry getID2Entry() |
| | | { |
| | | return entryContainer.getID2Entry(); |
| | | } |
| | |
| | | * |
| | | * @return A DN2URI instance that can be used to manipulate the DN2URI tree. |
| | | */ |
| | | public DN2URI getDN2URI() |
| | | DN2URI getDN2URI() |
| | | { |
| | | return entryContainer.getDN2URI(); |
| | | } |
| | |
| | | * |
| | | * @return The entry container used to create a suffix instance. |
| | | */ |
| | | public EntryContainer getEntryContainer() |
| | | EntryContainer getEntryContainer() |
| | | { |
| | | return entryContainer; |
| | | } |
| | |
| | | * |
| | | * @return A suffixes Attribute Type - Index map. |
| | | */ |
| | | public Map<AttributeType, AttributeIndex> getAttrIndexMap() |
| | | Map<AttributeType, AttributeIndex> getAttrIndexMap() |
| | | { |
| | | return entryContainer.getAttributeIndexMap(); |
| | | } |
| | |
| | | * |
| | | * @param dn The DN to add to the map. |
| | | */ |
| | | public void addPending(DN dn) |
| | | void addPending(DN dn) |
| | | { |
| | | pendingMap.putIfAbsent(dn, new CountDownLatch(1)); |
| | | } |
| | |
| | | * |
| | | * @param dn The DN to remove from the map. |
| | | */ |
| | | public void removePending(DN dn) |
| | | void removePending(DN dn) |
| | | { |
| | | CountDownLatch l = pendingMap.remove(dn); |
| | | if(l != null) |
| | |
| | | * @throws StorageRuntimeException If an error occurred searching the DN cache, or dn2id tree. |
| | | * @throws InterruptedException If an error occurred processing the pending map |
| | | */ |
| | | public boolean isParentProcessed(DN dn, DNCache dnCache) throws StorageRuntimeException, InterruptedException |
| | | boolean isParentProcessed(DN dn, DNCache dnCache) throws StorageRuntimeException, InterruptedException |
| | | { |
| | | synchronized(synchObject) { |
| | | if(parentSet.contains(dn)) |
| | |
| | | * @param trusted True if the indexes should be trusted or false otherwise. |
| | | * @throws StorageRuntimeException If an error occurred setting the indexes to trusted. |
| | | */ |
| | | public void setIndexesTrusted(WriteableTransaction txn, boolean trusted) throws StorageRuntimeException |
| | | void setIndexesTrusted(WriteableTransaction txn, boolean trusted) throws StorageRuntimeException |
| | | { |
| | | for (AttributeIndex attributeIndex : entryContainer.getAttributeIndexes()) |
| | | { |
| | |
| | | * |
| | | * @return The src entry container. |
| | | */ |
| | | public EntryContainer getSrcEntryContainer() |
| | | EntryContainer getSrcEntryContainer() |
| | | { |
| | | return this.srcEntryContainer; |
| | | } |
| | |
| | | * |
| | | * @return The include branches. |
| | | */ |
| | | public List<DN> getIncludeBranches() |
| | | List<DN> getIncludeBranches() |
| | | { |
| | | return this.includeBranches; |
| | | } |
| | |
| | | * |
| | | * @return the exclude branches. |
| | | */ |
| | | public List<DN> getExcludeBranches() |
| | | List<DN> getExcludeBranches() |
| | | { |
| | | return this.excludeBranches; |
| | | } |
| | |
| | | * |
| | | * @return The base DN. |
| | | */ |
| | | public DN getBaseDN() |
| | | DN getBaseDN() |
| | | { |
| | | return this.baseDN; |
| | | } |