TenantIndex

public interface TenantIndex implements ContextAware, AutoCloseable

The index of tenant IDs in a multi-tenant application.

Inheritors

Functions

Link copied to clipboard
public abstract Set<TenantId> all()
Obtains the set of all stored tenant IDs.
Link copied to clipboard
public abstract void close()
Closes the index for further read or write operations.
Link copied to clipboard
public static TenantIndex createDefault()
Creates default implementation of TenantIndex for a multi-tenant context.
Link copied to clipboard
public abstract void keep(TenantId id)
Stores the passed tenant ID in the index.
Link copied to clipboard
public static TenantIndex singleTenant()
Obtains a TenantIndex to be used in single-tenant context.

Inherited functions

Link copied to clipboard
public void checkNotRegistered()
Verifies that this instance is NOT registered yet.
Link copied to clipboard
public void checkRegistered()
Verifies that this instance is already registered.
Link copied to clipboard
public abstract boolean isRegistered()
Determines if this instance is already registered with a Bounded Context.
Link copied to clipboard
public abstract void registerWith(BoundedContext context)
Registers this instance as a part of the given Bounded Context.