|
||||||||||
| 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
A specialized configuration embodies a set of Slice configurations. The original configuration properties are analyzed to create a set of Slice specific properties with defaulting rules.
| Field Summary | |
|---|---|
org.apache.openjpa.lib.conf.PluginValue |
distributionPolicyPlugin
|
static String |
DOT
|
org.apache.openjpa.lib.conf.PluginValue |
finderTargetPolicyPlugin
|
protected org.apache.openjpa.lib.conf.BooleanValue |
lenientPlugin
|
protected org.apache.openjpa.lib.conf.StringValue |
masterPlugin
|
protected org.apache.openjpa.lib.conf.StringListValue |
namesPlugin
|
static String |
PREFIX_OPENJPA
|
static String |
PREFIX_SLICE
|
org.apache.openjpa.lib.conf.PluginValue |
queryTargetPolicyPlugin
|
static String |
REGEX_DOT
|
org.apache.openjpa.lib.conf.StringListValue |
replicatedTypesPlugin
|
org.apache.openjpa.lib.conf.PluginValue |
replicationPolicyPlugin
|
| Fields inherited from class org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl |
|---|
connectionDecoratorPlugins, dbdictionaryPlugin, driverDataSourcePlugin, eagerFetchMode, fetchDirection, identifierUtilPlugin, jdbcListenerPlugins, lrsSize, mappingDefaultsPlugin, mappingFactoryPlugin, 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_DIAG, 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 |
| Constructor Summary | |
|---|---|
DistributedJDBCConfigurationImpl()
Create a configuration and declare the plug-ins. |
|
DistributedJDBCConfigurationImpl(org.apache.openjpa.lib.conf.ConfigurationProvider cp)
Configure itself as well as underlying slices. |
|
| Method Summary | |
|---|---|
org.apache.openjpa.lib.jdbc.DecoratingDataSource |
createConnectionFactory()
|
void |
fromProperties(Map original)
Given the properties, creates a set of individual configurations. |
List<String> |
getActiveSliceNames()
Gets the name of the active slices. |
List<String> |
getAvailableSliceNames()
Gets the name of the available slices. |
DistributedDataSource |
getConnectionFactory()
|
String |
getDistributionPolicy()
Gets the policy, as a plugin string, that governs how new instances will be distributed across the available slices. |
DistributionPolicy |
getDistributionPolicyInstance()
Gets the policy that governs how new instances will be distributed across the available slices. |
String |
getFinderTargetPolicy()
Gets the policy, as a plugin string, that governs which slices will be targeted for a given finder. |
FinderTargetPolicy |
getFinderTargetPolicyInstance()
Gets the policy that governs which slices will be targeted for a given finder. |
Slice |
getMasterSlice()
Gets the master slice. |
String |
getQueryTargetPolicy()
Gets the policy, as a plugin string, that governs which slices will be targeted for a given query. |
QueryTargetPolicy |
getQueryTargetPolicyInstance()
Gets the policy that governs which slices will be targeted for a given query. |
String |
getReplicationPolicy()
Gets the policy, as a plugin string, that governs how new replicated instances will be replicated across the available slices. |
ReplicationPolicy |
getReplicationPolicyInstance()
Gets the policy that governs how new replicated instances will be replicated across the available slices. |
Slice |
getSlice(String name)
Gets the Slice for a given name. |
Slice |
getSlice(String name,
boolean mustExist)
Get the Slice of the given slice. |
List<Slice> |
getSlices(Slice.Status... statuses)
Gets the slices of given status. |
boolean |
isLenient()
|
boolean |
isReplicated(Class<?> cls)
Affirms if the given type is replicated. |
void |
setDistributionPolicy(String policy)
Sets the policy, from the given plugin string, that governs how new instances will be distributed across the available slices. |
void |
setDistributionPolicyInstance(DistributionPolicy policy)
Sets the policy that governs how new instances will be distributed across the available slices. |
void |
setFinderTargetPolicy(String policy)
Sets the policy, from the given plugin string, that governs which slices will be targeted for a given finder. |
void |
setFinderTargetPolicyInstance(FinderTargetPolicy policy)
Sets the policy that governs which slices will be targeted for a given finder. |
void |
setLenient(boolean lenient)
|
void |
setMaster(String master)
|
void |
setQueryTargetPolicy(String policy)
Sets the policy, from the given plugin string, that governs which slices will be targeted for a given query. |
void |
setQueryTargetPolicyInstance(QueryTargetPolicy policy)
Sets the policy that governs which slices will be targeted for a given query. |
void |
setReplicationPolicy(String policy)
Sets the policy, from the given plugin string, that governs how new replicated instances will be replicated across the available slices. |
void |
setReplicationPolicyInstance(ReplicationPolicy policy)
Sets the policy that governs how new replicated instances will be replicated across the available slices. |
| Methods inherited from class org.apache.openjpa.lib.conf.ConfigurationImpl |
|---|
addBoolean, addDouble, addFile, addInt, addObject, addPlugin, addPluginList, addPropertyChangeListener, addString, addStringList, addValue, clone, close, equals, getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getId, getLog, getLog, getLogFactory, getMethodDescriptors, getProductName, getPropertiesResource, getPropertyDescriptors, getPropertyKeys, getPropertyKeys, getUserClassLoader, getValue, getValues, hashCode, isDeferResourceLoading, isReadOnly, loadGlobals, readExternal, removePropertyChangeListener, removeValue, setDeferResourceLoading, setId, setLog, setLogFactory, setProductName, setProperties, setPropertiesFile, setReadOnly, setUserClassLoader, 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, getConfigurationLog, getId, getLog, getLog, getLogFactory, getProductName, getPropertyKeys, getPropertyKeys, getUserClassLoader, getValue, getValues, instantiateAll, isReadOnly, removePropertyChangeListener, removeValue, setId, setLog, setLogFactory, setProductName, setReadOnly, setUserClassLoader, toProperties |
| Methods inherited from interface java.beans.BeanInfo |
|---|
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors |
| Field Detail |
|---|
protected org.apache.openjpa.lib.conf.BooleanValue lenientPlugin
protected org.apache.openjpa.lib.conf.StringValue masterPlugin
protected org.apache.openjpa.lib.conf.StringListValue namesPlugin
public org.apache.openjpa.lib.conf.PluginValue distributionPolicyPlugin
public org.apache.openjpa.lib.conf.PluginValue replicationPolicyPlugin
public org.apache.openjpa.lib.conf.PluginValue queryTargetPolicyPlugin
public org.apache.openjpa.lib.conf.PluginValue finderTargetPolicyPlugin
public org.apache.openjpa.lib.conf.StringListValue replicatedTypesPlugin
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()
public DistributedJDBCConfigurationImpl(org.apache.openjpa.lib.conf.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 getSlice(String name)
DistributedConfiguration
getSlice in interface DistributedConfiguration
public Slice getSlice(String name,
boolean mustExist)
mustExist - if true an exception if raised if the given slice name
is not a valid slice.public DistributionPolicy getDistributionPolicyInstance()
DistributedConfiguration
getDistributionPolicyInstance in interface DistributedConfigurationpublic String getDistributionPolicy()
DistributedConfiguration
getDistributionPolicy in interface DistributedConfigurationpublic void setDistributionPolicyInstance(DistributionPolicy policy)
DistributedConfiguration
setDistributionPolicyInstance in interface DistributedConfigurationpublic void setDistributionPolicy(String policy)
DistributedConfiguration
setDistributionPolicy in interface DistributedConfigurationpublic ReplicationPolicy getReplicationPolicyInstance()
DistributedConfiguration
getReplicationPolicyInstance in interface DistributedConfigurationpublic String getReplicationPolicy()
DistributedConfiguration
getReplicationPolicy in interface DistributedConfigurationpublic void setReplicationPolicyInstance(ReplicationPolicy policy)
DistributedConfiguration
setReplicationPolicyInstance in interface DistributedConfigurationpublic void setReplicationPolicy(String policy)
DistributedConfiguration
setReplicationPolicy in interface DistributedConfigurationpublic QueryTargetPolicy getQueryTargetPolicyInstance()
DistributedConfiguration
getQueryTargetPolicyInstance in interface DistributedConfigurationpublic String getQueryTargetPolicy()
DistributedConfiguration
getQueryTargetPolicy in interface DistributedConfigurationpublic void setQueryTargetPolicyInstance(QueryTargetPolicy policy)
DistributedConfiguration
setQueryTargetPolicyInstance in interface DistributedConfigurationpublic void setQueryTargetPolicy(String policy)
DistributedConfiguration
setQueryTargetPolicy in interface DistributedConfigurationpublic FinderTargetPolicy getFinderTargetPolicyInstance()
DistributedConfiguration
getFinderTargetPolicyInstance in interface DistributedConfigurationpublic String getFinderTargetPolicy()
DistributedConfiguration
getFinderTargetPolicy in interface DistributedConfigurationpublic void setFinderTargetPolicyInstance(FinderTargetPolicy policy)
DistributedConfiguration
setFinderTargetPolicyInstance in interface DistributedConfigurationpublic void setFinderTargetPolicy(String policy)
DistributedConfiguration
setFinderTargetPolicy in interface DistributedConfigurationpublic DistributedDataSource getConnectionFactory()
getConnectionFactory in interface OpenJPAConfigurationgetConnectionFactory in class JDBCConfigurationImplpublic boolean isLenient()
public void setLenient(boolean lenient)
public void setMaster(String master)
public Slice getMasterSlice()
getMasterSlice in interface DistributedJDBCConfigurationpublic void fromProperties(Map original)
fromProperties in interface org.apache.openjpa.lib.conf.ConfigurationfromProperties in class org.apache.openjpa.lib.conf.ConfigurationImplpublic org.apache.openjpa.lib.jdbc.DecoratingDataSource createConnectionFactory()
createConnectionFactory in class JDBCConfigurationImplpublic boolean isReplicated(Class<?> cls)
DistributedConfiguration
isReplicated in interface DistributedConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||