Init method.

@return
@throws Exception
4168
public InmemQueue<ID, DATA> init() throws Exception {
        queue = createQueue(boundary);
        if (!isEphemeralDisabled()) {
            ephemeralStorage = new ConcurrentHashMap<>();
        }

        super.init();

        return this;
    }
1086382
public function init() {
        if (!$this->database->session_lock_supported()) {
            throw new exception('sessionhandlerproblem', 'error', '', null, 'Database does not support session locking');
        }

        $result = session_set_save_handler(array($this, 'handler_open'),
            array($this, 'handler_close'),
            array($this, 'handler_read'),
            array($this, 'handler_write'),
            array($this, 'handler_destroy'),
            array($this, 'handler_gc'));
        if (!$result) {
            throw new exception('dbsessionhandlerproblem', 'error');
        }
    }
1278503
@PostConstruct
  public void init()
    throws Exception
  {
    if (_encoding == null)
      throw new ConfigException(L.l("character-encoding requires a 'value' attribute with the character encoding."));

    _localEncoding.set(_encoding);
  }
1285238
protected void initModel() throws Exception {
        Model.getSingleton().init(getControlOverrides());
        Model.getSingleton().getOptionsParam().setGUI(getArgs().isGUI());
    }
745662
@SuppressWarnings("ProhibitedExceptionDeclared")
    @PostConstruct
    public void init() throws Exception {
        final String configFileLocation = getConfigFileLocation();
        T fileConfig = getEmptyConfig();

        boolean fileExists = false;

        log.info("Using {} as config file location", configFileLocation);

        try (Reader reader = new BufferedReader(new InputStreamReader(new FileInputStream(configFileLocation), "UTF-8"))) {
            fileConfig = mapper.readValue(reader, getConfigClass());

            if (fileConfig instanceof PasswordsConfig<?>) {
                fileConfig = ((PasswordsConfig<T>) fileConfig).withDecryptedPasswords(textEncryptor);
            }

            fileExists = true;
        } catch (final FileNotFoundException e) {
            log.warn("Config file not found, using empty configuration object");
        } catch (final IOException e) {
            log.error("Error reading config file at {}", configFileLocation);
            log.error("Recording stack trace", e);
            // throw this so we don't continue to start the webapp
            throw new IllegalStateException("Could not initialize configuration", e);
        }

        if (StringUtils.isNotBlank(defaultConfigFile)) {
            try (InputStream defaultConfigInputStream = getClass().getResourceAsStream(defaultConfigFile)) {
                if (defaultConfigInputStream != null) {
                    final T defaultConfig = mapper.readValue(defaultConfigInputStream, getConfigClass());

                    fileConfig = fileConfig.merge(defaultConfig);

                    if (!fileExists) {
                        fileConfig = generateDefaultLogin(fileConfig);

                        try {
                            writeOutConfigFile(fileConfig, configFileLocation);
                        } catch (final IOException e) {
                            throw new IllegalStateException("Could not initialize configuration", e);
                        }
                    }
                }
            } catch (final IOException e) {
                log.error("Error reading default config file", e);
                // throw this so we don't continue to start the webapp
                throw new IllegalStateException("Could not initialize configuration", e);
            }
        }

        try {
            fileConfig.basicValidate("Root");
        } catch (final ConfigException e) {
            log.error("Config validation failed in " + e);
            throw new IllegalStateException("Could not initialize configuration", e);
        }

        config.set(fileConfig);
        postInitialise(getConfig());
    }
276565
@Override
    protected void init() throws Exception {
        BootstrapContextImpl bootstrapContext = bootstrapContextRef.getServiceWithException();

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(this, tc, "loading", mcfImplClassName);
        if (mcfImplClassName == null) // TODO: get the real config element name of the nested properties
            throw new IllegalArgumentException(Utils.getMessage("J2CA8504.incorrect.props.list", "properties", configElementName, id));
        mcf = (ManagedConnectionFactory) bootstrapContext.loadClass(mcfImplClassName).newInstance();
        bootstrapContext.configure(mcf, jndiName, properties, null, null, null);

        if (connectionManagerRef == null)
            conMgrSvc = ConnectionManagerService.createDefaultService(jndiName);
        else
            conMgrSvc = (ConnectionManagerService) priv.locateService(componentContext, CONNECTION_MANAGER);
        conMgrSvc.addObserver(this);
        isInitialized.set(true);

        conMgrSvc.addRaClassLoader(bootstrapContext.getRaClassLoader());
    }
1182271
private void initTemplates() throws Exception {
        if (templates != null && templates.length > 0) {
            for (String template : templates) {
                Assert.hasText(template, "Can not read template in ["
                        + template
                        + "]. Check that templates is not empty.");
                createTemplate(client.getLowLevelClient(), classpathRoot, template, forceTemplate);
            }
        }
    }
886510
@PostConstruct
    public void init() throws Exception {
        // init the title hamburger icon
        final JFXTooltip burgerTooltip = new JFXTooltip("Open drawer");

        drawer.setOnDrawerOpening(e -> {
            final Transition animation = titleBurger.getAnimation();
            burgerTooltip.setText("Close drawer");
            animation.setRate(1);
            animation.play();
        });
        drawer.setOnDrawerClosing(e -> {
            final Transition animation = titleBurger.getAnimation();
            burgerTooltip.setText("Open drawer");
            animation.setRate(-1);
            animation.play();
        });
        titleBurgerContainer.setOnMouseClicked(e -> {
            if (drawer.isClosed() || drawer.isClosing()) {
                drawer.open();
            } else {
                drawer.close();
            }
        });

        FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/ui/popup/MainPopup.fxml"));
        loader.setController(new InputController());
        toolbarPopup = new JFXPopup(loader.load());

        optionsBurger.setOnMouseClicked(e ->
            toolbarPopup.show(optionsBurger,
                PopupVPosition.TOP,
                PopupHPosition.RIGHT,
                -12,
                15));
        JFXTooltip.setVisibleDuration(Duration.millis(3000));
        JFXTooltip.install(titleBurgerContainer, burgerTooltip, Pos.BOTTOM_CENTER);

        // create the inner flow and content
        context = new ViewFlowContext();
        // set the default controller
        Flow innerFlow = new Flow(ButtonController.class);

        final FlowHandler flowHandler = innerFlow.createHandler(context);
        context.register("ContentFlowHandler", flowHandler);
        context.register("ContentFlow", innerFlow);
        final Duration containerAnimationDuration = Duration.millis(320);
        drawer.setContent(flowHandler.start(new ExtendedAnimatedFlowContainer(containerAnimationDuration, SWIPE_LEFT)));
        context.register("ContentPane", drawer.getContent().get(0));

        // side controller will add links to the content flow
        Flow sideMenuFlow = new Flow(SideMenuController.class);
        final FlowHandler sideMenuFlowHandler = sideMenuFlow.createHandler(context);
        drawer.setSidePane(sideMenuFlowHandler.start(new ExtendedAnimatedFlowContainer(containerAnimationDuration,
            SWIPE_LEFT)));
    }
930374
public final synchronized void init(final Class<T> pClass) throws Exception {
    this.objectClass = pClass;
    this.fieldsNames = new HashSet<String>();
    Field[] fields = getUtlReflection().retrieveFields(this.objectClass);
    for (Field field : fields) {
      this.fieldsNames.add(field.getName());
    }
  }
1054541
public void start() throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "start", this);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(tc, "Start ME, mode defaulting to ME_START_DEFAULT");
        start(JsConstants.ME_START_DEFAULT);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "start");
    }
1105866
private static void initialize() throws AsyncException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "initialize");
        }

        capabilities = aio_init(MAX_IDENTIFIERS, AsyncException.class);
        aioInitialized = AIO_INITIALIZED;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "initialize: " + capabilities);
        }
    }
1000219
public MongodbQueue<ID, DATA> init() throws Exception {
        if (getMongoClient() == null) {
            setMongoClient(buildMongoClient(), true);
        }

        super.init();

        if (getMongoClient() == null) {
            throw new IllegalStateException("MongoDB Client is null.");
        }

        initCollection();

        return this;
    }
1080377
public synchronized final void initialize() throws RepositoryException {
        if (!initialized) {
            try {
                doInitialize();
                initialized = true;
            } catch (RuntimeException e) {
                throw new RepositoryException(e);
            }
        }
    }
796540
public HttpServlet initServlet() throws Exception {

		servlet = (HttpServlet) servletClass.newInstance();
		servlet.init(servletConfig);
		return servlet;
	}
444754
public static synchronized void init ()
    {
        // only initialize ourselves once
        if (_keys != null) {
            return;
        } else {
            _keys = new ArrayList<Class<?>>();
            _values = new ArrayList<String>();
        }

        // first try loading the properties file without a leading slash
        ClassLoader cld = ExceptionMap.class.getClassLoader();
        InputStream config = ConfigUtil.getStream(PROPS_NAME, cld);
        if (config == null) {
            log.warning("Unable to load " + PROPS_NAME + " from CLASSPATH.");

        } else {
            // otherwise process ye old config file.
            try {
                // we'll do some serious jiggery pokery to leverage the parsing
                // implementation provided by java.util.Properties. god bless
                // method overloading
                final ArrayList<String> classes = new ArrayList<String>();
                Properties loader = new Properties() {
                    @Override public Object put (Object key, Object value) {
                        classes.add((String)key);
                        _values.add((String)value);
                        return key;
                    }
                };
                loader.load(config);

                // now cruise through and resolve the exceptions named as
                // keys and throw out any that don't appear to exist
                for (int i = 0; i < classes.size(); i++) {
                    String exclass = classes.get(i);
                    try {
                        Class<?> cl = Class.forName(exclass);
                        // replace the string with the class object
                        _keys.add(cl);

                    } catch (Throwable t) {
                        log.warning("Unable to resolve exception class.", "class", exclass,
                                    "error", t);
                        _values.remove(i);
                        i--; // back on up a notch
                    }
                }

            } catch (IOException ioe) {
                log.warning("Error reading exception mapping file: " + ioe);
            }
        }
    }
1116742
@PostConstruct
    public void init() throws Exception {

        if (hosts == null) {
            throw new IllegalArgumentException("Hosts property not set ");
        }

        determineHostsAsProperty();

        /**
         * quick fix for integration tests. if hosts property set to "embedded" then a local node is start.
         * maven dependencies need to be defined correctly for this to work
         */

        if (hosts.startsWith("embedded")) {
            synchronized (SYNC) {
                if (node == null) {
                    node = new ElasticsearchEmbeddedNode();
                }
            }
            client = node.getClient();
        } else {
            String[] hostsArray = hosts.split(",");
            Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", cluster).build();
            client = new TransportClient(settings);

            for (String aHostsArray : hostsArray) {
                String s = aHostsArray.trim();
                String[] host = s.split(":");

                if (log.isLoggable(Level.FINE)) {
                    log.fine(" Connecting to elasticsearch host. [" + host[0] + ":" + host[1] + "]");
                }

                client = ((TransportClient)client).addTransportAddress(new InetSocketTransportAddress(host[0],
                        new Integer(host[1])));
            }
        }
    }
403741
public static final void init() {
        String settingDir = System.getProperty(SETTINGS_DIR);
        if (settingDir == null) {
            settingDir = System.getenv(SETTINGS_DIR);
        }
        if (settingDir == null) {
            throw Fault.create(SettingsFaultCodes.SettingsDirNotSpecified, SETTINGS_DIR);
        }
        init(settingDir);
    }