/** @deprecated since 0.7.0; use {@link #rebind(RebindOptions)} */ @Deprecated public static Collection<Application> rebindAll( File mementoDir, ClassLoader classLoader, RebindExceptionHandler exceptionHandler) throws Exception { return rebindAll( RebindOptions.create() .mementoDir(mementoDir) .classLoader(classLoader) .exceptionHandler(exceptionHandler)); }
/** @deprecated since 0.7.0; use {@link #rebind(RebindOptions)} */ @Deprecated public static Collection<Application> rebindAll( ManagementContext newManagementContext, File mementoDir, ClassLoader classLoader) throws Exception { return rebindAll( RebindOptions.create() .newManagementContext(newManagementContext) .mementoDir(mementoDir) .classLoader(classLoader)); }
/** @deprecated since 0.7.0; use {@link #rebind(RebindOptions)} */ @Deprecated public static Collection<Application> rebindAll( LocalManagementContext newManagementContext, ClassLoader classLoader, RebindExceptionHandler exceptionHandler) throws Exception { return rebindAll( RebindOptions.create() .newManagementContext(newManagementContext) .classLoader(classLoader) .exceptionHandler(exceptionHandler)); }
/** @deprecated since 0.7.0; use {@link #rebind(RebindOptions)} */ @Deprecated public static Application rebind( ManagementContext newManagementContext, File mementoDir, ClassLoader classLoader, RebindExceptionHandler exceptionHandler) throws Exception { return rebind( RebindOptions.create() .newManagementContext(newManagementContext) .mementoDir(mementoDir) .classLoader(classLoader) .exceptionHandler(exceptionHandler)); }
/** @deprecated since 0.7.0; use {@link #rebind(RebindOptions)} */ @Deprecated public static Collection<Application> rebindAll( ManagementContext newManagementContext, File mementoDir, ClassLoader classLoader, RebindExceptionHandler exceptionHandler, PersistenceObjectStore objectStore) throws Exception { return rebindAll( RebindOptions.create() .newManagementContext(newManagementContext) .mementoDir(mementoDir) .classLoader(classLoader) .exceptionHandler(exceptionHandler) .objectStore(objectStore)); }
private void doTestAddAndRebindAndDeleteLocation(boolean suppressPeriodicCheckpointing) throws Exception { String symbolicName = "sample_location"; String yaml = Joiner.on("\n") .join( "brooklyn.catalog:", " items:", " - id: " + symbolicName, " version: " + TEST_VERSION, " itemType: location", " item:", " type: " + LocalhostMachineProvisioningLocation.class.getName(), " brooklyn.config:", " cfg1: 111", " cfg2: 222"); CatalogLocationItemDto item = CatalogItemBuilder.newLocation(symbolicName, TEST_VERSION) .displayName(symbolicName) .plan(yaml) .build(); origManagementContext.getCatalog().addItem(item); assertEquals(item.getCatalogItemType(), CatalogItemType.LOCATION); if (!suppressPeriodicCheckpointing) { rebindAndAssertCatalogsAreEqual(); } else { LocalManagementContext nmc = RebindTestUtils.managementContextBuilder(mementoDir, classLoader) .forLive(useLiveManagementContext()) .emptyCatalog(useEmptyCatalog()) .persistPeriod(Duration.PRACTICALLY_FOREVER) .buildUnstarted(); rebind(RebindOptions.create().newManagementContext(nmc)); } deleteItem(newManagementContext, item.getSymbolicName(), item.getVersion()); switchOriginalToNewManagementContext(); rebindAndAssertCatalogsAreEqual(); }
/** @deprecated since 0.7.0; use {@link #rebind(RebindOptions)} */ @Deprecated public static Application rebind(ManagementContext newManagementContext, ClassLoader classLoader) throws Exception { return rebind( RebindOptions.create().newManagementContext(newManagementContext).classLoader(classLoader)); }
/** Convenience for common call; delegates to {@link #rebind(RebindOptions)} */ public static Application rebind(File mementoDir, ClassLoader classLoader) throws Exception { return rebind(RebindOptions.create().mementoDir(mementoDir).classLoader(classLoader)); }