Interface TenantDescriptors

All Known Subinterfaces:
TenantComponentProvider<T>, TenantProvider
All Known Implementing Classes:
AxonServerTenantProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TenantDescriptors
Interface for components that can provide a list of tenant descriptors.
Since:
5.3.0
Author:
Jan Galinski
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Indicates whether the given tenant is one of the tenants of this application.
    Returns a list of tenant descriptors.
  • Method Details

    • tenants

      Returns a list of tenant descriptors.
      Returns:
      the list of tenant descriptors
    • isKnown

      default boolean isKnown(TenantDescriptor tenant)
      Indicates whether the given tenant is one of the tenants of this application.

      Answered on every message that carries a tenant, so an implementation backed by a set should override this to test membership directly rather than through the list tenants() builds.

      Parameters:
      tenant - the tenant to check
      Returns:
      true when the given tenant is known
      Since:
      5.3.0