@SPI
public abstract class TenantAwareOperation
extends java.lang.Object
implements java.lang.Runnable
TenantAwareOperation.execute()
Modifier | Constructor and Description |
---|---|
protected |
TenantAwareOperation()
Creates an instance of an operation which uses the
TenantId
set in the execution context. |
protected |
TenantAwareOperation(io.spine.core.TenantId tenantId)
Creates an instance of an operation for the tenant specified by the passed ID.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Executes the operation.
|
protected TenantAwareOperation() throws java.lang.IllegalStateException
TenantId
set in the execution context.java.lang.IllegalStateException
- if there is no current TenantId
setprotected TenantAwareOperation(io.spine.core.TenantId tenantId)
If a default instance of TenantId
is passed (because the application works in
a single-tenant mode), singleTenant() value will be
substituted.
tenantId
- the tenant ID or default valuepublic void execute()
The execution goes through the following steps:
Runnable.run()
method is called.