@Test public void testGetStartPatch() throws Throwable { assertThat(TaskSchedulerServiceStateBuilder.getStartPatch(TestServiceWithStage.class), instanceOf(TestServiceWithStage.State.class)); }
public static ServiceDocument getStartPatch(Class<?> service) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method buildPatchMethod = service.getMethod("buildStartPatch"); return (ServiceDocument) buildPatchMethod.invoke(null); }
TaskSchedulerServiceStateBuilder implements TaskStateBuilder { public static ServiceDocument getStartPatch(Class<?> service) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method buildPatchMethod = service.getMethod("buildStartPatch"); return (ServiceDocument) buildPatchMethod.invoke(null); } }
TaskSchedulerServiceStateBuilder implements TaskStateBuilder { public static ServiceDocument getStartPatch(Class<?> service) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method buildPatchMethod = service.getMethod("buildStartPatch"); return (ServiceDocument) buildPatchMethod.invoke(null); } TaskSchedulerServiceStateBuilder(Class<? extends StatefulService> service, int maxRunningTasks); }
TaskSchedulerServiceStateBuilder implements TaskStateBuilder { public static ServiceDocument getStartPatch(Class<?> service) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method buildPatchMethod = service.getMethod("buildStartPatch"); return (ServiceDocument) buildPatchMethod.invoke(null); } TaskSchedulerServiceStateBuilder(Class<? extends StatefulService> service, int maxRunningTasks); @Override TaskSchedulerService.State build(); static String getSuffixFromSelfLink(String selfLink); static ServiceDocument getStartPatch(Class<?> service); }
TaskSchedulerServiceStateBuilder implements TaskStateBuilder { public static ServiceDocument getStartPatch(Class<?> service) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method buildPatchMethod = service.getMethod("buildStartPatch"); return (ServiceDocument) buildPatchMethod.invoke(null); } TaskSchedulerServiceStateBuilder(Class<? extends StatefulService> service, int maxRunningTasks); @Override TaskSchedulerService.State build(); static String getSuffixFromSelfLink(String selfLink); static ServiceDocument getStartPatch(Class<?> service); static long triggerInterval; }