public interface ContainerFactory
JohnsonEventContainer implementations for use as part
of their configuration.
For example, multi-tenant applications need a way to group events in the container per-tenant, allowing tenants to
see only those application and request events which relate to their view of the system. In such a scenario, the
application may register a custom ContainerFactory which returns a tenant-aware container. This keeps any
dependency on or knowledge of multi-tenancy libraries Johnson.| Modifier and Type | Method and Description |
|---|---|
JohnsonEventContainer |
create()
Creates a
JohnsonEventContainer for use storing events. |
@Nonnull JohnsonEventContainer create()
JohnsonEventContainer for use storing events.
This method will be called exactly once during Johnson initialisation, and the returned event container
will be used to service all requests on all threads. As a result, the returned implementation is required to be
thread-safe. For multi-tenant systems, handling the differentiation between events for each tenant must happen
below the interface, on a single instance (at least from Johnson's perspective) of the container.Copyright © 2014 Atlassian. All rights reserved.