ModeShape Distribution 3.2.0.Final

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
 org.infinispan.manager.CacheContainer getCacheContainer(String name)
          Get the cache container with the given name.
 org.jgroups.Channel getChannel(String name)
          Get the JGroups channel with the given logical 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

org.infinispan.manager.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)

getChannel

org.jgroups.Channel getChannel(String name)
                               throws Exception
Get the JGroups channel with the given logical name.

Parameters:
name - the name of the channel; may not be null
Returns:
the channel, or null if there is no such channel and the environment does not support clustering
Throws:
Exception - if there is a problem obtaining the named channel

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.


ModeShape Distribution 3.2.0.Final

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