Package io.fabric8.dosgi.impl

Examples of io.fabric8.dosgi.impl.Manager.destroy()


                if (recursive || force) {
                    for (Container child : found.getChildren()) {
                        child.destroy(force);
                    }
                }
                found.destroy(force);
            } else if (force) {
                //We also want to try and delete any leftover entries
                fabricService.adapt(DataStore.class).deleteContainer(fabricService, containerName);
            }
        }
View Full Code Here


            //We want to check if container exists before we actually delete them.
            //We need this because getContainer will create a container object if container doesn't exists.
            if (ZooKeeperUtils.exists(curator, ZkPath.CONTAINER.getPath(name)) != null) {
                Container container = fabricService.getContainer(name);
                //We want to go through container destroy method so that cleanup methods are properly invoked.
                container.destroy();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
View Full Code Here

            FabricService fabricService = fabricProxy.getService();
            for (Container aux : containers) {
                try {
                    //We want to use the latest metadata
                    Container container = fabricService.getContainer(aux.getId());
                    container.destroy(true);
                } catch (Exception ex) {
                    //noop
                }
            }
        } finally {
View Full Code Here

                    boolean stopped = "Instance already stopped".equals(ex.getMessage());
                    if (!stopped) {
                        providerException = ex;
                    }
                }
                provider.destroy(container);
                destroyed = true;
            } else {
                invalidContainer = true;
                throw new FabricException("Container's lifecycle not managed by Fabric8 (the container was not created by Fabric8).");
            }
View Full Code Here

    protected void destroyManager() {
        if (manager != null) {
            Manager mgr = manager;
            manager = null;
            try {
                mgr.destroy();
            } catch (IOException e) {
                //ignore
            }
        }
    }
View Full Code Here

            verify(bundleContext, registration, reference, expBundleContext, expBundle);

        }
        finally {
            try {
                zkServerFactoryBean.destroy();
            } catch (Throwable t) { }
        }
    }

    static int getFreePort() throws IOException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.