Package com.atlassian.confluence.tenant
Class VolatileSingleTenantRegistry
- java.lang.Object
-
- com.atlassian.confluence.tenant.VolatileSingleTenantRegistry
-
- All Implemented Interfaces:
TenantRegistry
,com.atlassian.tenancy.api.TenantAccessor
,com.atlassian.tenancy.api.TenantContext
@ParametersAreNonnullByDefault @Deprecated(forRemoval=true) public class VolatileSingleTenantRegistry extends Object implements TenantRegistry, com.atlassian.tenancy.api.TenantAccessor, com.atlassian.tenancy.api.TenantContext
Deprecated, for removal: This API element is subject to removal in a future version.since 8.6Zero to one tenant registry.The registered tenant is not persisted, meaning it has to be replayed during bootstrap.
This class should be considered a temporary solution on the way to multi-tenancy.
- Since:
- 5.6
-
-
Constructor Summary
Constructors Constructor Description VolatileSingleTenantRegistry()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addTenant(com.atlassian.tenancy.api.Tenant tenant)
Deprecated, for removal: This API element is subject to removal in a future version.<T> T
asTenant(com.atlassian.tenancy.api.Tenant tenant, Callable<T> callback)
Deprecated, for removal: This API element is subject to removal in a future version.Iterable<com.atlassian.tenancy.api.Tenant>
getAvailableTenants()
Deprecated, for removal: This API element is subject to removal in a future version.@NonNull com.atlassian.tenancy.api.Tenant
getCurrentTenant()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isRegistryVacant()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isTenantRegistered(com.atlassian.tenancy.api.Tenant tenant)
Deprecated, for removal: This API element is subject to removal in a future version.boolean
removeTenant(com.atlassian.tenancy.api.Tenant tenant)
Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.tenant.TenantRegistry
hasTenant
-
-
-
-
Method Detail
-
getAvailableTenants
public Iterable<com.atlassian.tenancy.api.Tenant> getAvailableTenants()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getAvailableTenants
in interfacecom.atlassian.tenancy.api.TenantAccessor
-
asTenant
public <T> T asTenant(com.atlassian.tenancy.api.Tenant tenant, Callable<T> callback) throws com.atlassian.tenancy.api.TenantUnavailableException, InvocationTargetException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
asTenant
in interfacecom.atlassian.tenancy.api.TenantAccessor
- Throws:
com.atlassian.tenancy.api.TenantUnavailableException
InvocationTargetException
-
addTenant
public boolean addTenant(com.atlassian.tenancy.api.Tenant tenant)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
addTenant
in interfaceTenantRegistry
- Parameters:
tenant
- the tenant to add- Returns:
- true if the tenant was added during this request, false if the registry already knew it
-
removeTenant
public boolean removeTenant(com.atlassian.tenancy.api.Tenant tenant)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
removeTenant
in interfaceTenantRegistry
- Parameters:
tenant
- the tenant to remove- Returns:
- true if the tenant was removed, false if the registry didn't know about it
-
isTenantRegistered
public boolean isTenantRegistered(com.atlassian.tenancy.api.Tenant tenant)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isTenantRegistered
in interfaceTenantRegistry
- Parameters:
tenant
- the tenant to test for being registered- Returns:
- true if the tenant is currently registered
-
isRegistryVacant
public boolean isRegistryVacant()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isRegistryVacant
in interfaceTenantRegistry
- Returns:
- true if the registry currently has no tenants
-
getCurrentTenant
public @NonNull com.atlassian.tenancy.api.Tenant getCurrentTenant()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getCurrentTenant
in interfacecom.atlassian.tenancy.api.TenantContext
-
-