Class DenyAclCollector
The search index cannot express denial, so such entries are dropped when an object is indexed. That is worth telling an administrator about, but the per-entry message it used to produce fired once per deny entry per object and drowned the rebuild log.
Collection is only active between start() and stop(), which
IndexRebuildService brackets a rebuild with. Outside a rebuild — during ordinary
indexing — record(java.lang.String) does nothing beyond a volatile read, so nothing accumulates in a
long-running instance.
State is held per thread. A rebuild runs on the thread that called it, and keeping the collected ids thread-local means concurrent ordinary indexing on other threads cannot add to a rebuild's report, nor can two rebuilds interfere.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the identifiers collected on this thread, in encounter order.static voidNote that the object with the given identifier carries at least one deny entry.static voidstart()Start collecting on the current thread, discarding anything previously collected.static voidstop()Stop collecting on the current thread and release the collected identifiers.
-
Method Details
-
start
public static void start()Start collecting on the current thread, discarding anything previously collected. -
record
Note that the object with the given identifier carries at least one deny entry. Does nothing when no rebuild is running on this thread.- Parameters:
identifier- the identifier of the event or series, may be null
-
collected
Return the identifiers collected on this thread, in encounter order.- Returns:
- the identifiers, empty if no rebuild is running
-
stop
public static void stop()Stop collecting on the current thread and release the collected identifiers.
-