@ThreadSafe public interface Environment
RepositoryConfiguration
.Modifier and Type | Method and Description |
---|---|
default Document |
defaultPersistenceConfiguration()
Returns a default persistence configuration document, when nothing is explicitly configured for a repository.
|
org.jgroups.Channel |
getChannel(String name)
Get the JGroups channel with the given logical name.
|
ClassLoader |
getClassLoader(Object caller,
String... classpathEntries)
Get a classloader given the supplied set of logical classpath entries, which the implementation can interpret however it
needs.
|
default SchematicDb |
getDb(Document persistenceConfig)
Returns
SchematicDb instance for the given configuration and optional classpath entries using a
custom loader . |
default void |
shutdown()
Shutdown this environment, allowing it to reclaim any resources.
|
default Document defaultPersistenceConfiguration()
Document
instance, never null
default SchematicDb getDb(Document persistenceConfig)
SchematicDb
instance for the given configuration and optional classpath entries using a
custom loader
. The supplied configuration document may contain a custom
RepositoryConfiguration.FieldName.CLASSLOADER
attribute which if present, will be used as an
additional classpath entry.persistenceConfig
- a Document
representing the persistence configuration document; it may be null in which
case a default configuration
will be usedSchematicDb
instance, never null
ConfigurationException
- if no persistence provider can return a valid database.ClassLoader getClassLoader(Object caller, String... classpathEntries)
caller
- the object instance which calls this method and whose class loader will be used as a fallback; may not be nullclasspathEntries
- the logical classpath entries; may be nullorg.jgroups.Channel getChannel(String name) throws Exception
name
- the name of the channel; may not be nullException
- if there is a problem obtaining the named channeldefault void shutdown()
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.