Package de.hybris.platform.core
Class SlaveTenant
java.lang.Object
de.hybris.platform.core.AbstractTenant
de.hybris.platform.core.SlaveTenant
- All Implemented Interfaces:
DataSourceProvider,Tenant,Serializable
- Direct Known Subclasses:
TestSlaveTenantStub
The slave tenant represents any other tenant exept the master tenant. Each hybris installation contains one master
tenant and none/some slave tenants. TODO: apidoc - add missing informations
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.core.AbstractTenant
AbstractTenant.CodeWrapper, AbstractTenant.DataSourceHolder, AbstractTenant.DataSourceSelection, AbstractTenant.ShutDownMode, AbstractTenant.State, AbstractTenant.TenantNotYetStartedException -
Field Summary
FieldsFields inherited from class de.hybris.platform.core.AbstractTenant
ALT_DATASOURCE, MASTER_DATASOURCE_ID, SLAVE_DATASOURCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanchangeSystemSpecificProps(String key, String value) booleanchangeSystemSpecificProps(Map<String, String> params) protected List<AbstractTenant.DataSourceHolder>createAlternativeDataSources(DataSourceFactory factory, ConfigIntf cfg, Collection<HybrisDataSource> createdForRollback) protected CacheextractExtNames(String cfg) protected MasterTenantUses either the locale specified in theConfig.SystemSpecificParams.LOCALEconfig parameter or, if not set, the vm default locale.Uses either the time zone specified in theConfig.SystemSpecificParams.TIME_ZONEconfig parameter or, if not set, the vm default time zone.booleanisActive()booleanbooleanisValid()protected voidrelaseAdministrationLockIfNeeded(HybrisDataSource masterDataSource) Tries to release administration lock if lock was acquired by thisAbstractTenant.getClusterID()node.protected voidDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 use an off-line tenant configurationvoidsetDatabaseSettings(String url, String user, String password, String driver, String tableprefix, String fromJNDI) protected voidsetExtNames(List<String> names_unmod) Sets with the given extension name list the new extensions of the current tenant.voidDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 modification of the tenant's extension names on the fly is not available.voidshutDown()voidstartUp()toString()voidDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 favour offline tenant configurationMethods inherited from class de.hybris.platform.core.AbstractTenant
activateAlternativeDataSource, activateAlternativeMasterDataSource, activateSlaveDataSource, activateSlaveDataSource, assertTenant, assureTypeSystemStructureIsUpToDate, backgroundThreadFinished, backgroundThreadStarted, cancelForceMasterMode, cannotAccess, cannotConnect, canSwitch, clearConnectionHasBeenBroken, connectionHasBeenBroken, createAlternativeDataSource, createAndRegisterBackgroundThread, createDataSourceFactory, createDataSourceFactory, createDefaultThreadPool, createMasterDataSource, deactivateAlternativeDataSource, deactivateSlaveDataSource, doInitialize, doShutDown, doStartUp, equals, executeInitsIfNecessary, extractCustomDBParams, extractCustomDBParams, extractCustomDBParams, extractCustomDBParams, forceMasterDataSource, getActiveSession, getActiveSessionContextList, getAllAlternativeDataSources, getAllAlternativeMasterDataSourceIDs, getAllAlternativeMasterDataSources, getAllAlterntiveDataSourceIDs, getAllDataSourceIDs, getAllSlaveDataSourceIDs, getAllSlaveDataSources, getCache, getClusterID, getCurrentTenant, getDataSource, getDataSource, getDynamicClusterNodeID, getInvalidationManager, getJaloConnection, getMasterDataSource, getNextSlave, getPersistenceManager, getPersistencePool, getSerialNumberGenerator, getSingletonCreator, getState, getStateInfo, getSystemEJB, getTenantID, getTenantRestartMarker, getThreadPool, getWorkersThreadPool, hashCode, initializeCache, isAlternativeMasterDataSource, isClusteringEnabled, isConnectionPoolCheckEnabled, isForceMaster, isNotifiyingListeners, isSlaveDataSource, isStarting, isStopping, mergeSlaveDataSourceParameter, performWithinOwnSystem, readParameters, resetTenantRestartMarker, setActiveSessionForCurrentThread, setState, setSystemInit, setTenantID, shutdownCache, writeReplace
-
Field Details
-
JUNIT_TENANT_ID
- See Also:
-
ITEM_CREATION_LIFECYCLE_LISTENER
- See Also:
-
-
Constructor Details
-
SlaveTenant
-
-
Method Details
-
getMasterTenant
-
createAlternativeDataSources
protected List<AbstractTenant.DataSourceHolder> createAlternativeDataSources(DataSourceFactory factory, ConfigIntf cfg, Collection<HybrisDataSource> createdForRollback) - Overrides:
createAlternativeDataSourcesin classAbstractTenant
-
relaseAdministrationLockIfNeeded
Description copied from class:AbstractTenantTries to release administration lock if lock was acquired by thisAbstractTenant.getClusterID()node.- Overrides:
relaseAdministrationLockIfNeededin classAbstractTenant
-
extractExtNames
-
setExtNames
Sets with the given extension name list the new extensions of the current tenant. If the current tenant is already initialized than the given list must contain all installed extensions and maybe new extensions. If an extension name is missing (meaning the extension should be removed and the tenant is initialized) an IllegalStateException is thrown. Any required but missing extension is added automatically.- Parameters:
names_unmod- the list of extension names
-
createCache
- Overrides:
createCachein classAbstractTenant
-
unInitialize
Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 favour offline tenant configuration -
isInitialized
public boolean isInitialized()- Returns:
- true if the slave system is initialized
-
changeSystemSpecificProps
-
changeSystemSpecificProps
- Parameters:
params-
-
isActive
public boolean isActive() -
isValid
public boolean isValid() -
shutDown
public void shutDown()- Specified by:
shutDownin classAbstractTenant
-
startUp
public void startUp()- Specified by:
startUpin classAbstractTenant
-
setDatabaseSettings
-
restartIfActive
Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 use an off-line tenant configuration -
getDatabaseURL
-
getDatabaseUser
-
getDatabaseDriver
-
getDatabasePassword
-
getDatabaseTablePrefix
-
getDatabaseFromJNDI
-
getOwnConfig
-
getTenantSpecificExtensionNames
- Specified by:
getTenantSpecificExtensionNamesin interfaceTenant- Specified by:
getTenantSpecificExtensionNamesin classAbstractTenant
-
setTenantSpecificExtensionNames
@Deprecated(since="5.0", forRemoval=true) public void setTenantSpecificExtensionNames(List<String> names) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 modification of the tenant's extension names on the fly is not available. -
getTenantSpecificLocale
Uses either the locale specified in theConfig.SystemSpecificParams.LOCALEconfig parameter or, if not set, the vm default locale.- See Also:
-
getTenantSpecificTimeZone
Uses either the time zone specified in theConfig.SystemSpecificParams.TIME_ZONEconfig parameter or, if not set, the vm default time zone.- See Also:
-
getConfig
- Specified by:
getConfigin interfaceTenant- Specified by:
getConfigin classAbstractTenant
-
toString
- Overrides:
toStringin classAbstractTenant
-
getAllItemLifecycleListeners
-