|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.lib.conf.ConfigurationImpl
org.apache.openjpa.conf.OpenJPAConfigurationImpl
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl
org.apache.openjpa.slice.jdbc.DistributedJDBCConfigurationImpl
public class DistributedJDBCConfigurationImpl
Implements a distributed configuration of JDBCStoreManagers. The original configuration properties are analyzed to create a set of Slice specific properties with defaulting rules.
| Field Summary | |
|---|---|
protected PluginValue |
distributionPolicyPlugin
|
static String |
DOT
|
protected ExecutorServiceValue |
executorServicePlugin
|
protected BooleanValue |
lenientPlugin
|
protected StringValue |
masterPlugin
|
protected StringListValue |
namesPlugin
|
static String |
PREFIX_OPENJPA
|
static String |
PREFIX_SLICE
|
static String |
REGEX_DOT
|
| Fields inherited from class org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl |
|---|
connectionDecoratorPlugins, dbdictionaryPlugin, driverDataSourcePlugin, eagerFetchMode, fetchDirection, jdbcListenerPlugins, lrsSize, mappingDefaultsPlugin, mappingFactoryPlugin, querySQLCache, resultSetType, schema, schemaFactoryPlugin, schemas, sqlFactoryPlugin, subclassFetchMode, synchronizeMappings, transactionIsolation, updateManagerPlugin |
| Fields inherited from class org.apache.openjpa.lib.conf.ConfigurationImpl |
|---|
id, logFactoryPlugin |
| Fields inherited from interface org.apache.openjpa.jdbc.conf.JDBCConfiguration |
|---|
LOG_JDBC, LOG_SCHEMA, LOG_SQL |
| Fields inherited from interface org.apache.openjpa.lib.conf.Configuration |
|---|
ATTRIBUTE_ALLOWED_VALUES, ATTRIBUTE_CATEGORY, ATTRIBUTE_INTERFACE, ATTRIBUTE_ORDER, ATTRIBUTE_TYPE, ATTRIBUTE_XML, INIT_STATE_FREEZING, INIT_STATE_FROZEN, INIT_STATE_LIQUID |
| Fields inherited from interface java.beans.BeanInfo |
|---|
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
| Fields inherited from interface org.apache.openjpa.lib.conf.Configuration |
|---|
ATTRIBUTE_ALLOWED_VALUES, ATTRIBUTE_CATEGORY, ATTRIBUTE_INTERFACE, ATTRIBUTE_ORDER, ATTRIBUTE_TYPE, ATTRIBUTE_XML, INIT_STATE_FREEZING, INIT_STATE_FROZEN, INIT_STATE_LIQUID |
| Fields inherited from interface java.beans.BeanInfo |
|---|
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
| Constructor Summary | |
|---|---|
DistributedJDBCConfigurationImpl(ConfigurationProvider cp)
Configure itself as well as underlying slices. |
|
| Method Summary | |
|---|---|
(package private) Map |
createSliceProperties(Map original,
String slice)
Creates given slice specific configuration properties from
given original key-value map. |
List<String> |
getActiveSliceNames()
Gets the name of the active slices. |
List<String> |
getAvailableSliceNames()
Gets the name of the available slices. |
Object |
getConnectionFactory()
The connection factory, possibly from JNDI. |
(package private) String |
getConnectionInfo(OpenJPAConfiguration conf)
|
DistributionPolicy |
getDistributionPolicyInstance()
Gets the policy that governs how new instances will be distributed across the available slices. |
String |
getExecutorService()
Gets the alias for ExecutorService being used. |
ExecutorService |
getExecutorServiceInstance()
Gets the ExecutorService being used. |
Slice |
getMaster()
Gets the master slice. |
Slice |
getSlice(String name)
Get the configuration for given slice. |
List<Slice> |
getSlices(Slice.Status... statuses)
Gets the slices of given status. |
(package private) boolean |
isXACompliant(DataSource ds)
|
void |
setDistributionPolicyInstance(String val)
|
void |
setExecutorService(ExecutorService txnManager)
|
(package private) void |
setSlices(Map original)
Create individual slices with configurations from the given properties. |
| Methods inherited from class org.apache.openjpa.lib.conf.ConfigurationImpl |
|---|
addBoolean, addDouble, addFile, addInt, addObject, addPlugin, addPluginList, addPropertyChangeListener, addString, addStringList, addValue, clone, close, equals, fromProperties, getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getId, getLog, getLog, getLogFactory, getMethodDescriptors, getProductName, getPropertiesResource, getPropertyDescriptors, getValue, getValues, hashCode, isReadOnly, loadGlobals, readExternal, removePropertyChangeListener, removeValue, setId, setLog, setLogFactory, setProductName, setProperties, setPropertiesFile, setReadOnly, toProperties, toXMLName, valueChanged, writeExternal |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.openjpa.lib.conf.Configuration |
|---|
addPropertyChangeListener, addValue, clone, close, fromProperties, getConfigurationLog, getId, getLog, getLog, getLogFactory, getProductName, getValue, getValues, instantiateAll, isReadOnly, removePropertyChangeListener, removeValue, setId, setLog, setLogFactory, setProductName, setReadOnly, toProperties |
| Methods inherited from interface java.beans.BeanInfo |
|---|
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors |
| Methods inherited from interface org.apache.openjpa.lib.conf.Configuration |
|---|
addPropertyChangeListener, addValue, clone, close, fromProperties, getConfigurationLog, getId, getLog, getLog, getLogFactory, getProductName, getValue, getValues, instantiateAll, isReadOnly, removePropertyChangeListener, removeValue, setId, setLog, setLogFactory, setProductName, setReadOnly, toProperties |
| Methods inherited from interface java.beans.BeanInfo |
|---|
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors |
| Field Detail |
|---|
protected BooleanValue lenientPlugin
protected StringValue masterPlugin
protected StringListValue namesPlugin
protected ExecutorServiceValue executorServicePlugin
protected PluginValue distributionPolicyPlugin
public static final String DOT
public static final String REGEX_DOT
public static final String PREFIX_SLICE
public static final String PREFIX_OPENJPA
| Constructor Detail |
|---|
public DistributedJDBCConfigurationImpl(ConfigurationProvider cp)
| Method Detail |
|---|
public List<String> getActiveSliceNames()
getActiveSliceNames in interface DistributedConfigurationpublic List<String> getAvailableSliceNames()
getAvailableSliceNames in interface DistributedConfigurationpublic List<Slice> getSlices(Slice.Status... statuses)
getSlices in interface DistributedConfigurationstatuses - list of status flags. If null, returns all slices
irrespective of status.public Slice getMaster()
getMaster in interface DistributedJDBCConfigurationpublic Slice getSlice(String name)
getSlice in interface DistributedConfigurationpublic DistributionPolicy getDistributionPolicyInstance()
DistributedConfiguration
getDistributionPolicyInstance in interface DistributedConfigurationpublic void setDistributionPolicyInstance(String val)
public Object getConnectionFactory()
OpenJPAConfiguration
getConnectionFactory in interface OpenJPAConfigurationgetConnectionFactory in class JDBCConfigurationImplString getConnectionInfo(OpenJPAConfiguration conf)
boolean isXACompliant(DataSource ds)
void setSlices(Map original)
Map createSliceProperties(Map original,
String slice)
slice specific configuration properties from
given original key-value map. The rules are
"slice.XXX." where
XXX is the given slice name, then replace
"slice.XXX. with openjpa..
"slice." but not with
"slice.XXX.", the ignore i.e. any property of other
slices or global slice property e.g.
slice.DistributionPolicy
if key starts with "openjpa." and a corresponding
"slice.XXX." property does not exist, then use this as
default property
property with any other prefix is simply copied
public String getExecutorService()
DistributedJDBCConfiguration
getExecutorService in interface DistributedJDBCConfigurationpublic void setExecutorService(ExecutorService txnManager)
public ExecutorService getExecutorServiceInstance()
DistributedJDBCConfiguration
getExecutorServiceInstance in interface DistributedJDBCConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||