public final class DataSourceProviderActiveObjectsFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataSourceProviderActiveObjectsFactory.ActiveObjectsDataSource |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
LOCK_TIMEOUT_SECONDS |
protected org.slf4j.Logger |
logger |
protected com.atlassian.sal.api.transaction.TransactionTemplate |
transactionTemplate |
| Constructor and Description |
|---|
DataSourceProviderActiveObjectsFactory(ActiveObjectUpgradeManager aoUpgradeManager,
com.atlassian.activeobjects.internal.EntityManagerFactory entityManagerFactory,
TenantAwareDataSourceProvider tenantAwareDataSourceProvider,
com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate,
com.atlassian.beehive.ClusterLockService clusterLockService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(ActiveObjectsConfiguration configuration)
Tells whether the give data source type is supported by this factory, users should call this method before
calling
ActiveObjectsFactory.create(ActiveObjectsConfiguration, Tenant) to avoid an IllegalStateException being
thrown. |
ActiveObjects |
create(ActiveObjectsConfiguration configuration,
com.atlassian.tenancy.api.Tenant tenant)
Creates a new instance of
ActiveObjects each time it is called. |
protected ActiveObjects |
doCreate(ActiveObjectsConfiguration configuration,
com.atlassian.tenancy.api.Tenant tenant)
Creates an
ActiveObjects using the
TenantAwareDataSourceProvider |
void |
setTransactionSynchronizationManager(TransactionSynchronisationManager transactionSynchronizationManager) |
protected final org.slf4j.Logger logger
protected static final int LOCK_TIMEOUT_SECONDS
protected final com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate
public DataSourceProviderActiveObjectsFactory(ActiveObjectUpgradeManager aoUpgradeManager, com.atlassian.activeobjects.internal.EntityManagerFactory entityManagerFactory, TenantAwareDataSourceProvider tenantAwareDataSourceProvider, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, com.atlassian.beehive.ClusterLockService clusterLockService)
public void setTransactionSynchronizationManager(TransactionSynchronisationManager transactionSynchronizationManager)
protected ActiveObjects doCreate(ActiveObjectsConfiguration configuration, com.atlassian.tenancy.api.Tenant tenant)
ActiveObjects using the
TenantAwareDataSourceProviderconfiguration - the configuration of active objectsActiveObjectsPluginException - if the data source obtained from the TenantAwareDataSourceProvider
is nullpublic final boolean accept(ActiveObjectsConfiguration configuration)
ActiveObjectsFactoryActiveObjectsFactory.create(ActiveObjectsConfiguration, Tenant) to avoid an IllegalStateException being
thrown.accept in interface ActiveObjectsFactoryconfiguration - the configuration of active objectstrue if the configuration is supported.public final ActiveObjects create(ActiveObjectsConfiguration configuration, com.atlassian.tenancy.api.Tenant tenant)
ActiveObjectsFactoryActiveObjects each time it is called.create in interface ActiveObjectsFactoryconfiguration - th configuration of active objectstenant - against which to createActiveObjectsActiveObjectsFactory.accept(ActiveObjectsConfiguration)Copyright © 2018 Atlassian. All rights reserved.