| | |
| | | */ |
| | | class Suffix |
| | | { |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private final List<DN> includeBranches, excludeBranches; |
| | |
| | | private final EntryContainer entryContainer; |
| | | private final Object synchObject = new Object(); |
| | | private static final int PARENT_ID_SET_SIZE = 16 * 1024; |
| | | private final ConcurrentHashMap<DN, CountDownLatch> pendingMap = |
| | | new ConcurrentHashMap<DN, CountDownLatch>(); |
| | | private final Set<DN> parentSet = new HashSet<DN>(PARENT_ID_SET_SIZE); |
| | | private final ConcurrentHashMap<DN, CountDownLatch> pendingMap = new ConcurrentHashMap<>(); |
| | | private final Set<DN> parentSet = new HashSet<>(PARENT_ID_SET_SIZE); |
| | | |
| | | Suffix(EntryContainer entryContainer) |
| | | { |
| | | this(entryContainer, null, null, null); |
| | | } |
| | | |
| | | /** |
| | | * Creates a suffix instance using the specified parameters. |
| | |
| | | } |
| | | else |
| | | { |
| | | this.includeBranches = new ArrayList<DN>(0); |
| | | this.includeBranches = new ArrayList<>(0); |
| | | } |
| | | if (excludeBranches != null) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | this.excludeBranches = new ArrayList<DN>(0); |
| | | this.excludeBranches = new ArrayList<>(0); |
| | | } |
| | | } |
| | | |
| | |
| | | return entryContainer.getDN2ID(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns the ID2Entry instance pertaining to a suffix instance. |
| | | * |
| | |
| | | return entryContainer.getID2Entry(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns the DN2URI instance pertaining to a suffix instance. |
| | | * |
| | |
| | | return entryContainer.getDN2URI(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns the entry container pertaining to a suffix instance. |
| | | * |
| | |
| | | return entryContainer; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Return the Attribute Type - Index map used to map an attribute type to an |
| | | * index instance. |
| | |
| | | return entryContainer.getAttributeIndexMap(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Make sure the specified parent DN is not in the pending map. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Add specified DN to the pending map. |
| | | * |
| | |
| | | pendingMap.putIfAbsent(dn, new CountDownLatch(1)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Remove the specified DN from the pending map, it may not exist if the |
| | | * entries are being migrated so just return. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Return {@code true} if the specified dn is contained in the parent set, or |
| | | * in the specified DN cache. This would indicate that the parent has already |
| | |
| | | return parentThere; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Sets the trusted status of all of the indexes and vlvIndexes. |
| | | * |