Class AbstractJMXMBean.TenantAwareExecutor<T>
java.lang.Object
de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean.TenantAwareExecutor<T>
- Type Parameters:
T- - the return type
- Enclosing class:
- AbstractJMXMBean
Inner tenant aware executor class. This claas deals with the AbstractJMXMBean.activateTenant() and
AbstractJMXMBean.deactivateTenant() calls.
<code>
public Integer getMaxAllowedSize()
{
<b>return</b> new TenantAwareExecutor<Integer>()
{
protected Integer doExecute()
{
<b>return</b> Integer.valueOf(Registry.getCurrentTenant().getCache().getMaxAllowedSize());
}
}.getResult();
}
</code>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TenantAwareExecutor
protected TenantAwareExecutor()callsperform()
-
-
Method Details
-
getResult
- Returns:
- the result of the
doExecute()operation.
-
getCurrentTenant
-
doExecute
The content of this method will run with activated tenant and the tenant will always deactivated afterward.- Returns:
- your result
-