org.apache.openjpa.slice
Interface DistributedConfiguration

All Superinterfaces:
BeanInfo, Cloneable, Closeable, Configuration, OpenJPAConfiguration, Serializable
All Known Subinterfaces:
DistributedJDBCConfiguration
All Known Implementing Classes:
DistributedJDBCConfigurationImpl

public interface DistributedConfiguration
extends OpenJPAConfiguration

A configuration for multiple data stores, each referred as slice. This configuration allows each underlying slice be configured with its own specific configuration properties such as JDBC Driver or connection user/password etc.
This configuration also extends by adding a DistributionPolicy that governs how new instances be distributed among the slices.

Author:
Pinaki Poddar

Field Summary
 
Fields inherited from interface org.apache.openjpa.conf.OpenJPAConfiguration
LOG_DATACACHE, LOG_ENHANCE, LOG_METADATA, LOG_QUERY, LOG_RUNTIME, LOG_TOOL, OPTION_DATASTORE_CONNECTION, OPTION_EMBEDDED_COLLECTION_RELATION, OPTION_EMBEDDED_MAP_RELATION, OPTION_EMBEDDED_RELATION, OPTION_ID_APPLICATION, OPTION_ID_DATASTORE, OPTION_INC_FLUSH, OPTION_JDBC_CONNECTION, OPTION_NONTRANS_READ, OPTION_NULL_CONTAINER, OPTION_OPTIMISTIC, OPTION_QUERY_SQL, OPTION_TYPE_ARRAY, OPTION_TYPE_COLLECTION, OPTION_TYPE_MAP, OPTION_VALUE_AUTOASSIGN, OPTION_VALUE_INCREMENT
 
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
 
Method Summary
 List<String> getActiveSliceNames()
          Gets the active slice identifiers.
 List<String> getAvailableSliceNames()
          Gets the available slice identifiers irrespective of their status.
 DistributionPolicy getDistributionPolicyInstance()
          Gets the policy that governs how new instances will be distributed across the available slices.
 Slice getSlice(String sliceName)
          Gets the Slice for a given name.
 List<Slice> getSlices(Slice.Status... statuses)
          Gets the slices of given status.
 
Methods inherited from interface org.apache.openjpa.conf.OpenJPAConfiguration
getAggregateListenerInstances, getAggregateListeners, getAutoClear, getAutoClearConstant, getAutoDetach, getAutoDetachConstant, getBrokerFactory, getBrokerFactoryEventManager, getBrokerImpl, getCacheMarshallerInstances, getCacheMarshallers, getClassResolver, getClassResolverInstance, getCompatibility, getCompatibilityInstance, getConnection2DriverName, getConnection2Password, getConnection2Properties, getConnection2URL, getConnection2UserName, getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactory2Properties, getConnectionFactoryMode, getConnectionFactoryName, getConnectionFactoryProperties, getConnectionPassword, getConnectionProperties, getConnectionRetainMode, getConnectionRetainModeConstant, getConnectionURL, getConnectionUserName, getDataCache, getDataCacheManager, getDataCacheManagerInstance, getDataCacheTimeout, getDetachStateInstance, getDynamicDataStructs, getFetchBatchSize, getFetchGroups, getFetchGroupsList, getFilterListenerInstances, getFilterListeners, getFlushBeforeQueries, getFlushBeforeQueriesConstant, getIgnoreChanges, getInverseManager, getLockManager, getLockTimeout, getManagedRuntime, getManagedRuntimeInstance, getMapping, getMaxFetchDepth, getMetaDataFactory, getMetaDataRepository, getMetaDataRepositoryInstance, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getOrphanedKeyAction, getOrphanedKeyActionInstance, getProxyManager, getProxyManagerInstance, getQueryCache, getQueryCompilationCache, getQueryCompilationCacheInstance, getReadLockLevel, getReadLockLevelConstant, getRefreshFromDataCache, getRemoteCommitEventManager, getRemoteCommitProvider, getRestoreState, getRestoreStateConstant, getRetainState, getRetryClassRegistration, getRuntimeUnenhancedClasses, getRuntimeUnenhancedClassesConstant, getSavepointManager, getSavepointManagerInstance, getSequence, getSequenceInstance, getSpecification, getStoreFacadeTypeRegistry, getTransactionMode, getWriteLockLevel, getWriteLockLevelConstant, isConnectionFactoryModeManaged, isTransactionModeManaged, metaDataRepositoryAvailable, newBrokerInstance, newInverseManagerInstance, newLockManagerInstance, newMetaDataFactoryInstance, newMetaDataRepositoryInstance, newRemoteCommitProviderInstance, setAggregateListeners, setAggregateListeners, setAutoClear, setAutoClear, setAutoDetach, setAutoDetach, setBrokerFactory, setBrokerImpl, setCacheMarshallers, setClassResolver, setClassResolver, setCompatibility, setConnection2DriverName, setConnection2Password, setConnection2Properties, setConnection2URL, setConnection2UserName, setConnectionDriverName, setConnectionFactory, setConnectionFactory2, setConnectionFactory2Name, setConnectionFactory2Properties, setConnectionFactoryMode, setConnectionFactoryModeManaged, setConnectionFactoryName, setConnectionFactoryProperties, setConnectionPassword, setConnectionProperties, setConnectionRetainMode, setConnectionRetainMode, setConnectionURL, setConnectionUserName, setDataCache, setDataCacheManager, setDataCacheManager, setDataCacheTimeout, setDataCacheTimeout, setDetachState, setDetachState, setDynamicDataStructs, setDynamicDataStructs, setFetchBatchSize, setFetchBatchSize, setFetchGroups, setFetchGroups, setFilterListeners, setFilterListeners, setFlushBeforeQueries, setFlushBeforeQueries, setIgnoreChanges, setIgnoreChanges, setInverseManager, setLockManager, setLockTimeout, setLockTimeout, setManagedRuntime, setManagedRuntime, setMapping, setMaxFetchDepth, setMaxFetchDepth, setMetaDataFactory, setMetaDataRepository, setMetaDataRepository, setMultithreaded, setMultithreaded, setNontransactionalRead, setNontransactionalRead, setNontransactionalWrite, setNontransactionalWrite, setOptimistic, setOptimistic, setOrphanedKeyAction, setOrphanedKeyAction, setProxyManager, setProxyManager, setQueryCache, setQueryCompilationCache, setReadLockLevel, setReadLockLevel, setRefreshFromDataCache, setRefreshFromDataCache, setRemoteCommitEventManager, setRemoteCommitProvider, setRestoreState, setRestoreState, setRetainState, setRetainState, setRetryClassRegistration, setRetryClassRegistration, setRuntimeUnenhancedClasses, setRuntimeUnenhancedClasses, setSavepointManager, setSequence, setSequence, setSpecification, setTransactionMode, setTransactionModeManaged, setWriteLockLevel, setWriteLockLevel, supportedOptions
 
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
 

Method Detail

getActiveSliceNames

List<String> getActiveSliceNames()
Gets the active slice identifiers. This list is determined by the configuration properties either by explicit listing in openjpa.slice.Names property or by scanning openjpa.slice.*.* properties.
The ordering of the slice identifiers is determined when they are specified explicitly in openjpa.slice.Names property or ordered alphabetically when found by scanning the properties.
This list always returns the identifiers that are active, slices that can not be connected to are not included in this list.


getAvailableSliceNames

List<String> getAvailableSliceNames()
Gets the available slice identifiers irrespective of their status.

Returns:

getSlices

List<Slice> getSlices(Slice.Status... statuses)
Gets the slices of given status.

Parameters:
statuses - list of status flags. If null, returns all slices irrespective of status.

getSlice

Slice getSlice(String sliceName)
Gets the Slice for a given name. Exception is raised if the given slice is not configured.


getDistributionPolicyInstance

DistributionPolicy getDistributionPolicyInstance()
Gets the policy that governs how new instances will be distributed across the available slices.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.