psdi.util

Class MasterTenantAwareObj



  • public class MasterTenantAwareObj
    extends TenantAwareObj
    Class that make the object tenant aware. The object for tenants are maintained in a ConcurrentHashMap. So, synchronization is guaranteed.
    • Constructor Detail

      • MasterTenantAwareObj

        public MasterTenantAwareObj()
    • Method Detail

      • get

        protected java.lang.Object get(int tenantID)
        Get the object
        Overrides:
        get in class TenantLevelObj
        Parameters:
        tenantID -
        Returns:
      • get

        public java.lang.Object get(boolean nocontextIsFine)
        Overrides:
        get in class TenantAwareObj
      • set

        public void set(int tenantID,
                        java.lang.Object obj)
        Set the object. It does nothing if object is null.
        Overrides:
        set in class TenantLevelObj
        Parameters:
        tenantID -
        obj -
      • set

        public void set(java.lang.Object obj)
        Set the object. It does nothing if object is null.
        Overrides:
        set in class TenantLevelObj
        Parameters:
        obj -
      • set

        public void set(java.lang.Object obj,
                        boolean nocontextIsFine)
        Set the object and not throwing the error if the tenant context is not set. The tenant will be set to context -1 if no context is set.
        Overrides:
        set in class TenantAwareObj
        Parameters:
        boolean - not throwing the no context set message if true.