org.modeshape.jcr

## Interface Environment

- All Known Implementing Classes:
    LocalEnvironment, RepositoryService

      @ThreadSafe
      public interface Environment

  A basic environment in which a repository operates. The logical names supplied to these methods are typically obtained directly from the `RepositoryConfiguration`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CacheContainer` | `getCacheContainer(String name)` Get the cache container with the given name.
    `ClassLoader` | `getClassLoader(ClassLoader fallbackLoader, String... classpathEntries)` Get a classloader given the supplied set of logical classpath entries, which the implementation can interpret however it needs.
    `void` | `shutdown()` Shutdown this environment, allowing it to reclaim any resources.

- - ### Method Detail

    - #### getCacheContainer

          CacheContainer getCacheContainer(String name)
                                           throws IOException,
                                                  NamingException

      Get the cache container with the given name. Note that the name might be a logical name or it might refer to the location of an Infinispan configuration; the exact semantics is dependent upon the implementation.
      Parameters:
        `name` - the name of the cache container; may be null
      Returns:
        the cache container; never null
      Throws:
        `IOException` - if there is an error accessing any resources required to start the container
        `NamingException` - if there is an error accessing JNDI (if that is used in the implementation)

    - #### getClassLoader

          ClassLoader getClassLoader(ClassLoader fallbackLoader,
                                   String... classpathEntries)

      Get a classloader given the supplied set of logical classpath entries, which the implementation can interpret however it needs.
      Parameters:
        `fallbackLoader` - the classloader that should be used is the fallback class loader
        `classpathEntries` - the logical classpath entries
      Returns:
        the classloader

    - #### shutdown

          void shutdown()

      Shutdown this environment, allowing it to reclaim any resources.

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.