Init method.

@return
@throws Exception
320012
public RocksDbQueue<ID, DATA> init() throws Exception {
        File STORAGE_DIR = new File(storageDir);
        LOGGER.info("Storage Directory: " + STORAGE_DIR.getAbsolutePath());
        try {
            FileUtils.forceMkdir(STORAGE_DIR);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        try {
            batchPutToQueue = new WriteBatch();
            batchTake = new WriteBatch();

            dbOptions = RocksDbUtils.buildDbOptions();
            rocksDbWrapper = RocksDbWrapper.openReadWrite(STORAGE_DIR, dbOptions, null, null,
                    new String[] { cfNameEphemeral, cfNameMetadata, cfNameQueue });
            readOptions = rocksDbWrapper.getReadOptions();
            writeOptions = rocksDbWrapper.getWriteOptions();

            cfEphemeral = rocksDbWrapper.getColumnFamilyHandle(cfNameEphemeral);
            cfMetadata = rocksDbWrapper.getColumnFamilyHandle(cfNameMetadata);
            cfQueue = rocksDbWrapper.getColumnFamilyHandle(cfNameQueue);

            itQueue = rocksDbWrapper.getIterator(cfNameQueue);
            itEphemeral = rocksDbWrapper.getIterator(cfNameEphemeral);
            lastFetchedId = loadLastFetchedId();
        } catch (Exception e) {
            destroy();
            throw e instanceof RuntimeException ? (RuntimeException) e : new RuntimeException(e);
        }

        super.init();

        return this;
    }
1137103
public function initialize()
    {
        $driver = null;

        if (
            !in_array(strtolower($this->_class), $this->_supportedTypes) &&
            class_exists($this->_class)
        ) {
            $class = $this->_class;
            $driver = new $class($this->_options);
            if (!is_a($driver, 'Slick\Cache\DriverInterface')) {
                throw new Exception\InvalidDriverException(
                    "Class {$class} doesn't implement " .
                    "Slick\Cache\DriverInterface interface."
                );
            }
            return $driver;
        }

        switch (strtolower($this->_class)) {

            case 'file':            
                $driver = new Driver\File($this->_options);
                break;

            case 'memcached':            
                $driver = new Driver\Memcached($this->_options);
                break;

            default:
                throw new Exception\InvalidDriverException(
                    "Type {$this->_class} cache driver doesn't exists."
                );

        }
        return $driver;
    }
1191221
protected function init()
    {
        try {
            AnnotationRegistry::registerLoader(function ($class) {
                return (bool) class_exists($class);
            });
        } catch (\Exception $e) {
            throw new Exception\AnnotationReaderException($e->getMessage(), $e->getCode(), $e);
        }
    }
1023882
public void init() throws ChannelException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "init");
        }
        super.init();

        if (!getConfig().isInbound()) {
            try {
                this.asyncChannelGroup = findOrCreateACG();
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Created completion port for outbound connections, completionPort = " + this.asyncChannelGroup.getCompletionPort());
                }
            } catch (AsyncException ae) {
                ChannelException ce = new ChannelException("Error creating async channel group ");
                ce.initCause(ae);
                throw ce;
            }
        }
        // create AIO CompletionListeners
        aioReadCompletionListener = new AioReadCompletionListener();
        aioWriteCompletionListener = new AioWriteCompletionListener();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "init");
        }
    }
123024
@Override
    public UniversalKafkaQueue init() throws Exception {
        super.init();

        if (getMessageFactory() == null) {
            setMessageFactory(UniversalIdIntQueueMessageFactory.INSTANCE);
        }

        return this;
    }
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);
  }
1063123
public void init() throws Exception {
    // configure the SSLContext with a TrustManager
    SSLContext ctx = SSLContext.getInstance("TLS");
    if (ignoreCertificates) {
      ctx.init(new KeyManager[0],
          new TrustManager[] { new DefaultTrustManager() }, new SecureRandom());
      SSLContext.setDefault(ctx);
    }
    HostnameVerifier hv = new IgnoreHostName();
    HttpsURLConnection.setDefaultHostnameVerifier(hv);
  }
46995
public void init(Configuration configuration)
			throws Exception
	{
		String baseName = configuration.getBootstrapPropertyResolver().getProperty("ResourceBundleFactory.Bundle");
		if (baseName != null)
		{
			this.baseName = baseName;
		}
	}
336536
public function init()
    {
        $json = [];
        foreach ($this->dataset as $file) {
            if (!(is_file($file) && is_readable($file))) {
                throw new Exception("File '$file' for dataset not readable.");
            }
            $content = file_get_contents($file);
            $key = pathinfo($file, PATHINFO_FILENAME);
            $json[$key] = json_decode($content, true);
        }

        $this->session->set(self::KEY, $json);
        return $this;
    }
1157993
public void initialize() throws Exception {

        List<Long> acctList = new ArrayList<Long>(config.custcount*2);
        List<String> stList = new ArrayList<String>(config.custcount*2);

        // generate customers
        System.out.println("generating " + config.custcount + " customers...");
        for (int c=0; c<config.custcount; c++) {

            if (c % 10000 == 0) {
                System.out.println("  "+c);
            }

            PersonGenerator.Person p = gen.newPerson();
            //int ac = rand.nextInt(areaCodes.length);

            client.callProcedure(new BenchmarkCallback("CUSTOMER.insert"),
                                 "CUSTOMER.insert",
                                 c,
                                 p.firstname,
                                 p.lastname,
                                 "Anytown",
                                 p.state,
                                 p.phonenumber,
                                 p.dob,
                                 p.sex
                                 );

            int accts = rand.nextInt(5);
            for (int a=0; a<accts; a++) {

                int acct_no = (c*100)+a;
                client.callProcedure(new BenchmarkCallback("ACCOUNT.insert"),
                                     "ACCOUNT.insert",
                                     acct_no,
                                     c,
                                     rand.nextInt(10000),
                                     rand.nextInt(10000),
                                     new Date(),
                                     "Y"
                                     );
                acctList.add(Long.valueOf(acct_no));
                stList.add(p.state);
            }
        }

        accounts = acctList.toArray(new Long[acctList.size()]);
        acct_states = stList.toArray(new String[stList.size()]);

        // generate vendor offers
        System.out.println("generating " + config.vendorcount + " vendors...");
        for (int v = 0; v < config.vendorcount; v++) {
            if (v % 10000 == 0) {
                System.out.println("  " + v);
            }

            client.callProcedure(new BenchmarkCallback("VENDOR_OFFERS.insert"),
                                 "VENDOR_OFFERS.insert",
                                 v,
                                 rand.nextInt(5) + 1,
                                 0,
                                 rand.nextInt(5) + 1,
                                 (double) rand.nextInt(100),
                                 0,
                                 offers[rand.nextInt(offers.length)]
                                 );
        }
    }
796540
public HttpServlet initServlet() throws Exception {

		servlet = (HttpServlet) servletClass.newInstance();
		servlet.init(servletConfig);
		return servlet;
	}
583940
public function init()
    {

        // init body stream
        $this->bodyStream = '';

        // init exception
        $this->exception = null;

        // init default response properties
        $this->statusCode = 200;
        $this->version = 'HTTP/1.1';
        $this->statusReasonPhrase = "OK";
        $this->mimeType = "text/plain";
        $this->state = HttpResponseStates::INITIAL;

        // initialize cookies and headers
        $this->cookies = array();
        $this->headers = array();

        // initialize the default headers
        $this->initDefaultHeaders();
    }
1082040
@Override
    public JdbcQueue<ID, DATA> init() throws Exception {
        SQL_COUNT = MessageFormat.format(SQL_COUNT, getTableName());
        SQL_COUNT_EPHEMERAL = MessageFormat.format(SQL_COUNT_EPHEMERAL, getTableNameEphemeral());

        if (jdbcHelper == null) {
            setJdbcHelper(buildJdbcHelper(), true);
        }

        super.init();

        if (jdbcHelper == null) {
            throw new IllegalStateException("JDBC helper is null.");
        }

        return this;
    }
916306
@Override
    public void init() throws InitializationException {
        List<String> options = getOptionsByCommand(getCommand());
        options.contains(ASYNC_OPTION);
        async = true;
    }
1080377
public synchronized final void initialize() throws RepositoryException {
        if (!initialized) {
            try {
                doInitialize();
                initialized = true;
            } catch (RuntimeException e) {
                throw new RepositoryException(e);
            }
        }
    }
1370015
public void init() throws Exception {
        try {
            unmarshalAndSetBackingMap();
        }
        //If we get to this point, the JSON file is well-formed, but its structure does not map into PersonDir backingMap generic type - fail fast.
        catch (final ClassCastException ex) {
            throw new BeanCreationException(String.format("The semantic structure of the person attributes JSON config is not correct. Please fix it in this resource: [%s]",
                    this.personAttributesConfigFile.getURI()));
        }
    }
71083
public synchronized static void init() throws Exception {

        LOGGER.info("--------------- LOAD CONFIG START ---------------");

        //
        LOGGER.info("Finer print: " + DisClientComConfig.getInstance().getInstanceFingerprint());

        // 导入系统配置
        DisClientSysConfig.getInstance().loadConfig(null);

        // 校验 系统配置
        DisInnerConfigHelper.verifySysConfig();

        // 导入用户配置
        DisClientConfig.getInstance().loadConfig(null);

        // 校验 用户配置
        DisInnerConfigHelper.verifyUserConfig();

        isInit = true;

        LOGGER.info("--------------- LOAD CONFIG END ---------------");
    }