public class WhiteboardUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WhiteboardUtils.ScheduleExecutionInstanceTypes |
Modifier and Type | Field and Description |
---|---|
static String |
JMX_OAK_DOMAIN
JMX Domain name under which Oak related JMX MBeans are registered
|
Constructor and Description |
---|
WhiteboardUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
getService(@NotNull Whiteboard wb,
@NotNull Class<T> type)
Returns the one of the currently available services from the whiteboard of the tracked type.
|
static <T> T |
getService(@NotNull Whiteboard wb,
@NotNull Class<T> type,
@Nullable Predicate<T> predicate)
Returns the one of the currently available services from the whiteboard of the tracked type.
|
static <T> T |
getService(@NotNull Whiteboard wb,
@NotNull Class<T> type,
Predicate<T> predicate)
Deprecated.
use
getService(Whiteboard, Class, Predicate) instead |
static <T> @NotNull List<T> |
getServices(@NotNull Whiteboard wb,
@NotNull Class<T> type)
Returns the currently available services from the whiteboard of the tracked type.
|
static <T> @NotNull List<T> |
getServices(@NotNull Whiteboard wb,
@NotNull Class<T> type,
@Nullable Predicate<T> predicate)
Returns the currently available services from the whiteboard of the tracked type.
|
static <T> @NotNull List<T> |
getServices(@NotNull Whiteboard wb,
@NotNull Class<T> type,
Predicate<T> predicate)
Deprecated.
|
static <T> Registration |
registerMBean(Whiteboard whiteboard,
Class<T> iface,
T bean,
String type,
String name) |
static <T> Registration |
registerMBean(Whiteboard whiteboard,
Class<T> iface,
T bean,
String type,
String name,
Map<String,String> attrs) |
static Registration |
scheduleWithFixedDelay(Whiteboard whiteboard,
Runnable runnable,
long delayInSeconds) |
static Registration |
scheduleWithFixedDelay(Whiteboard whiteboard,
Runnable runnable,
long delayInSeconds,
boolean runOnSingleClusterNode,
boolean useDedicatedPool) |
static Registration |
scheduleWithFixedDelay(Whiteboard whiteboard,
Runnable runnable,
Map<String,Object> extraProps,
long delayInSeconds,
boolean runOnSingleClusterNode,
boolean useDedicatedPool) |
static Registration |
scheduleWithFixedDelay(Whiteboard whiteboard,
Runnable runnable,
Map<String,Object> extraProps,
long delayInSeconds,
WhiteboardUtils.ScheduleExecutionInstanceTypes scheduleExecutionInstanceTypes,
boolean useDedicatedPool) |
public static final String JMX_OAK_DOMAIN
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, Runnable runnable, long delayInSeconds)
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, Runnable runnable, long delayInSeconds, boolean runOnSingleClusterNode, boolean useDedicatedPool)
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, Runnable runnable, Map<String,Object> extraProps, long delayInSeconds, boolean runOnSingleClusterNode, boolean useDedicatedPool)
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, Runnable runnable, Map<String,Object> extraProps, long delayInSeconds, WhiteboardUtils.ScheduleExecutionInstanceTypes scheduleExecutionInstanceTypes, boolean useDedicatedPool)
public static <T> Registration registerMBean(Whiteboard whiteboard, Class<T> iface, T bean, String type, String name)
public static <T> Registration registerMBean(Whiteboard whiteboard, Class<T> iface, T bean, String type, String name, Map<String,String> attrs)
@NotNull public static <T> @NotNull List<T> getServices(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull Class<T> type)
wb
- the whiteboardtype
- the service type@Nullable public static <T> T getService(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull Class<T> type)
null
@NotNull public static <T> @NotNull List<T> getServices(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull Class<T> type, @Nullable @Nullable Predicate<T> predicate)
predicate
is
not null
the returned list is limited to the ones that match the predicate.
Note that the underlying tracker is stopped automatically after the services are returned.wb
- the whiteboardtype
- the service typepredicate
- filtering predicate or null
@NotNull @Deprecated public static <T> @NotNull List<T> getServices(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull Class<T> type, @Nullable Predicate<T> predicate)
getServices(Whiteboard, Class, java.util.function.Predicate)
instead@Nullable public static <T> T getService(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull Class<T> type, @Nullable @Nullable Predicate<T> predicate)
predicate
is
not null
only a service that match the predicate is returned.
Note that the underlying tracker is closed automatically.wb
- the whiteboardtype
- the service typepredicate
- filtering predicate or null
null
@Nullable @Deprecated public static <T> T getService(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull Class<T> type, @Nullable Predicate<T> predicate)
getService(Whiteboard, Class, Predicate)
insteadCopyright © 2010 - 2020 Adobe. All Rights Reserved