Package com.sleepycat.je

Examples of com.sleepycat.je.Environment


    public void setAttribute(Attribute attribute)
        throws AttributeNotFoundException,
               InvalidAttributeValueException,
               MBeanException {

        Environment targetEnv = getEnvironmentIfOpen();
        try {
            jeHelper.setAttribute(targetEnv, attribute);
        } finally {
            /* release resources. */
            closeEnvironment(targetEnv);
View Full Code Here


      throw new IllegalArgumentException("Attributes cannot be null");
  }

        /* Get each requested attribute. */
        AttributeList results = new AttributeList();
        Environment targetEnv = getEnvironmentIfOpen();

        try {
            for (int i = 0; i < attributes.length; i++) {
                try {
                    String name = attributes[i];
View Full Code Here

      throw new IllegalArgumentException("attribute list can't be null");
  }

        /* Set each attribute specified. */
  AttributeList results = new AttributeList();
        Environment targetEnv = getEnvironmentIfOpen();

        try {
            for (int i = 0; i < attributes.size(); i++) {
                Attribute attr = (Attribute) attributes.get(i);
                try {
View Full Code Here

                         Object[] params,
                         String[] signature)
        throws MBeanException {

        Object result = null;
        Environment targetEnv = getEnvironmentIfOpen();
        try {
            result = jeHelper.invoke(targetEnv, actionName,
                                     params, signature);
        } finally {
            /* release resources. */
 
View Full Code Here

     * by the caller.
     */
    private Environment checkForMBeanReset(Environment targetEnv)
        throws MBeanException {

        Environment env = targetEnv;
        if (jeHelper.getNeedReset()) {

            /* Refresh the environmen handle. */
            closeEnvironment(env);
            env = getEnvironmentIfOpen();
View Full Code Here

  DbInternal.disableParameterValidation(envConfig);
  envConfig.setConfigParam(EnvironmentParams.NODE_MAX.getName(), "6");
        envConfig.setConfigParam
      (EnvironmentParams.LOG_FILE_MAX.getName(), "1024");
        envConfig.setAllowCreate(true);
        env = new Environment(envHome, envConfig);

        envImpl = DbInternal.envGetEnvironmentImpl(env);
    }
View Full Code Here

             Integer.toString(75));
        /* Force INDelete. */
        envConfig.setConfigParam
            (EnvironmentParams.NODE_MAX.getName(),
             Integer.toString(N_ENTRIES));
        env = new Environment(envHome, envConfig);
    }
View Full Code Here

      EnvironmentConfig envConfig = TestUtils.initEnvConfig();
      envConfig.setTransactional(true);
      envConfig.setAllowCreate(true);
      envConfig.setCacheSize(100000);
      envConfig.setConfigParam("java.util.logging.level", "OFF");
      env = new Environment(envHome, envConfig);

      String databaseName = "ioexceptiondb";
      DatabaseConfig dbConfig = new DatabaseConfig();
      dbConfig.setAllowCreate(true);
      dbConfig.setSortedDuplicates(true);
View Full Code Here

       EnvironmentParams.LOG_MEM_SIZE_MIN_STRING);
  if (cacheSize != 0) {
      envConfig.setCacheSize(cacheSize);
      envConfig.setConfigParam("java.util.logging.level", "OFF");
  }
  env = new Environment(envHome, envConfig);

        String databaseName = "ioexceptiondb";
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setAllowCreate(true);
        dbConfig.setSortedDuplicates(true);
View Full Code Here

    public void openEnv()
        throws DatabaseException {

        if (txnType == TXN_NULL) {
            envConfig.setTransactional(false);
            env = new Environment(envHome, envConfig);
        } else if (txnType == TXN_AUTO) {
            envConfig.setTransactional(true);
            env = new Environment(envHome, envConfig);
        } else if (txnType == TXN_USER) {
            envConfig.setTransactional(true);
            env = new Environment(envHome, envConfig);
        } else {
            assert false;
        }
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.je.Environment

Copyright © 2018 www.massapicom. 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.