psdi.util

Class TenantLevelObj

  • java.lang.Object
    • psdi.util.TenantLevelObj
  • Direct Known Subclasses:
    MasterTenantLevelObj, TenantAwareObj


    public class TenantLevelObj
    extends java.lang.Object
    Class that make the object tenant aware. The object for tenants are maintained in a ConcurrentHashMap. So, synchronization is guaranteed. The class does not take null values.
    • Constructor Detail

      • TenantLevelObj

        public TenantLevelObj()
    • Method Detail

      • set

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

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

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

        public java.lang.Object get()
      • hasObjectInCurrentContext

        public boolean hasObjectInCurrentContext()
      • removeObjectInContext

        public java.lang.Object removeObjectInContext()
      • clearAllTenants

        public void clearAllTenants()
        Remove the objects for all the tenants except for the master tn
      • clearTenant

        public void clearTenant()
      • unloadInactiveCaches

        public final void unloadInactiveCaches(long interval)
                                        throws MXException
        Throws:
        MXException