private InternalTenantContext getInternalTenantContextWithAccountRecordId( final UUID accountId, final InternalTenantContext tenantContext) { final InternalTenantContext tenantContextWithAccountRecordId; if (tenantContext.getAccountRecordId() == null) { tenantContextWithAccountRecordId = internalCallContextFactory.createInternalTenantContext(accountId, tenantContext); } else { tenantContextWithAccountRecordId = tenantContext; } return tenantContextWithAccountRecordId; }
@Override public List<BlockingState> getBlockingAllForAccountRecordId(final InternalTenantContext context) { return Objects.firstNonNull( blockingStatesPerAccountRecordId.get(context.getAccountRecordId()), ImmutableList.<BlockingState>of()); }
@Override public void invalidateCache( TenantKey key, final Object cookie, final InternalTenantContext tenantContext) { log.info("Invalidate catalog cache for tenantRecordId='{}'", tenantContext.getTenantRecordId()); catalogCache.clearCatalog(tenantContext); }