Class AdminMixin.Builder
java.lang.Object
org.apache.juneau.rest.server.ops.AdminMixin.Builder
- Enclosing class:
- AdminMixin
Builder for
AdminMixin instances.
Mirrors AdminProvider.Builder's configuration methods on the mixin's own surface and forwards
each call to an underlying AdminProvider.Builder, which builds the shared worker the mixin
delegates to.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()Constructor — package access forAdminMixin.create(). -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds anAdminMixininstance.cacheFlush(String name, Runnable hook) Registers a cache-flush hook under a name.cacheFlushAll(Map<String, Runnable> hooks) Registers multiple cache-flush hooks at once.threadNamePrefixExclude(String... values) Replaces the thread-name-prefix exclude list.
-
Constructor Details
-
Builder
protected Builder()Constructor — package access forAdminMixin.create().
-
-
Method Details
-
cacheFlush
Registers a cache-flush hook under a name.The hook is invoked synchronously when
POST /admin/cache/flushis called (with nonamesparameter, or with anamesparameter that includes this name).- Parameters:
name- The hook name. Must not benullor blank.hook- The hook. Must not benull.- Returns:
- This object.
-
cacheFlushAll
Registers multiple cache-flush hooks at once.- Parameters:
hooks- The hooks, keyed by registration name. Can benull(no-op).- Returns:
- This object.
-
threadNamePrefixExclude
Replaces the thread-name-prefix exclude list.Threads whose
namestarts with any of the supplied prefixes are omitted from the/admin/threadsoutput. Pass an empty array to disable filtering entirely.- Parameters:
values- The thread-name prefixes to exclude. Can benull(equivalent to an empty array — disables filtering);nullor empty elements are skipped.- Returns:
- This object.
-
build
Builds anAdminMixininstance.- Returns:
- A configured instance.
-