code: private Environment createEnvironment() {
          EnvironmentConfig envConf = createEnvConfig();
          if (!envFile.exists()) {
              envFile.mkdirs();
          }
          LOGGER.log(Level.INFO,
                  "Initialized BerkeleyDB cache environment at {0}",
                  envFile.getAbsolutePath());
  
          return new Environment(this.envFile, envConf);
      }
docs: Creates a Berkeley DB database environment from the provided environment
  configuration.
  
  @return an environment instance.
  
  @throws SecurityException if the directory for storing the databases
  could not be created.
  @throws EnvironmentNotFoundException if the environment does not exist
  (does not contain at least one log file) and the EnvironmentConfig
  AllowCreate parameter is false.
  @throws EnvironmentLockedException when an environment cannot be opened
  for write access because another process has the same environment open
  for write access. Warning: This exception should be handled when an
  environment is opened by more than one process.
  @throws VersionMismatchException when the existing log is not compatible
  with the version of JE that is running. This occurs when a later version
  of JE was used to create the log. Warning: This exception should be
  handled when more than one version of JE may be used to access an
  environment.
  @throws EnvironmentFailureException if an unexpected, internal or
  environment-wide failure occurs.
  @throws java.lang.UnsupportedOperationException if this environment was
  previously opened for replication and is not being opened read-only.
  @throws java.lang.IllegalArgumentException if an invalid parameter is
  specified, for example, an invalid EnvironmentConfig parameter.