Class WhiteboardUtils
- java.lang.Object
 - 
- org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils
 
 
- 
public class WhiteboardUtils extends java.lang.Object 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWhiteboardUtils.ScheduleExecutionInstanceTypes 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJMX_OAK_DOMAINJMX Domain name under which Oak related JMX MBeans are registered 
- 
Constructor Summary
Constructors Constructor Description WhiteboardUtils() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TgetService(@NotNull Whiteboard wb, @NotNull java.lang.Class<T> type)Returns the one of the currently available services from the whiteboard of the tracked type.static <T> TgetService(@NotNull Whiteboard wb, @NotNull java.lang.Class<T> type, @Nullable java.util.function.Predicate<T> predicate)Returns the one of the currently available services from the whiteboard of the tracked type.static <T> @NotNull java.util.List<T>getServices(@NotNull Whiteboard wb, @NotNull java.lang.Class<T> type)Returns the currently available services from the whiteboard of the tracked type.static <T> @NotNull java.util.List<T>getServices(@NotNull Whiteboard wb, @NotNull java.lang.Class<T> type, @Nullable java.util.function.Predicate<T> predicate)Returns the currently available services from the whiteboard of the tracked type.static <T> RegistrationregisterMBean(Whiteboard whiteboard, java.lang.Class<T> iface, T bean, java.lang.String type, java.lang.String name)static <T> RegistrationregisterMBean(Whiteboard whiteboard, java.lang.Class<T> iface, T bean, java.lang.String type, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attrs)static RegistrationscheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, long delayInSeconds)static RegistrationscheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, long delayInSeconds, boolean runOnSingleClusterNode, boolean useDedicatedPool)static RegistrationscheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, java.util.Map<java.lang.String,java.lang.Object> extraProps, long delayInSeconds, boolean runOnSingleClusterNode, boolean useDedicatedPool)static RegistrationscheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, java.util.Map<java.lang.String,java.lang.Object> extraProps, long delayInSeconds, WhiteboardUtils.ScheduleExecutionInstanceTypes scheduleExecutionInstanceTypes, boolean useDedicatedPool) 
 - 
 
- 
- 
Field Detail
- 
JMX_OAK_DOMAIN
public static final java.lang.String JMX_OAK_DOMAIN
JMX Domain name under which Oak related JMX MBeans are registered- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
scheduleWithFixedDelay
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, long delayInSeconds)
 
- 
scheduleWithFixedDelay
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, long delayInSeconds, boolean runOnSingleClusterNode, boolean useDedicatedPool)
 
- 
scheduleWithFixedDelay
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, java.util.Map<java.lang.String,java.lang.Object> extraProps, long delayInSeconds, boolean runOnSingleClusterNode, boolean useDedicatedPool)
 
- 
scheduleWithFixedDelay
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, java.lang.Runnable runnable, java.util.Map<java.lang.String,java.lang.Object> extraProps, long delayInSeconds, WhiteboardUtils.ScheduleExecutionInstanceTypes scheduleExecutionInstanceTypes, boolean useDedicatedPool)
 
- 
registerMBean
public static <T> Registration registerMBean(Whiteboard whiteboard, java.lang.Class<T> iface, T bean, java.lang.String type, java.lang.String name)
 
- 
registerMBean
public static <T> Registration registerMBean(Whiteboard whiteboard, java.lang.Class<T> iface, T bean, java.lang.String type, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attrs)
 
- 
getServices
@NotNull public static <T> @NotNull java.util.List<T> getServices(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull java.lang.Class<T> type)Returns the currently available services from the whiteboard of the tracked type. Note that the underlying tracker is closed automatically.- Parameters:
 wb- the whiteboardtype- the service type- Returns:
 - a list of services
 
 
- 
getService
@Nullable public static <T> T getService(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull java.lang.Class<T> type)Returns the one of the currently available services from the whiteboard of the tracked type. Note that the underlying tracker is closed automatically.- Returns:
 - one service or 
null 
 
- 
getServices
@NotNull public static <T> @NotNull java.util.List<T> getServices(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull java.lang.Class<T> type, @Nullable @Nullable java.util.function.Predicate<T> predicate)Returns the currently available services from the whiteboard of the tracked type. Ifpredicateis notnullthe returned list is limited to the ones that match the predicate. Note that the underlying tracker is stopped automatically after the services are returned.- Parameters:
 wb- the whiteboardtype- the service typepredicate- filtering predicate ornull- Returns:
 - a list of services
 
 
- 
getService
@Nullable public static <T> T getService(@NotNull @NotNull Whiteboard wb, @NotNull @NotNull java.lang.Class<T> type, @Nullable @Nullable java.util.function.Predicate<T> predicate)Returns the one of the currently available services from the whiteboard of the tracked type. Ifpredicateis notnullonly a service that match the predicate is returned. Note that the underlying tracker is closed automatically.- Parameters:
 wb- the whiteboardtype- the service typepredicate- filtering predicate ornull- Returns:
 - one service or 
null 
 
 - 
 
 -