Class AbstractHttpSessionCollection.HybridController

    • Constructor Detail

      • HybridController

        public HybridController()
    • Method Detail

      • init

        public void init​(HttpSessionCollection collection)
        Initialize the session distribution controller, so that it has the necessary context with which to make decisions regarding when to distribute sessions and their attributes.
        Specified by:
        init in interface HttpSessionCollection.SessionDistributionController
        Parameters:
        collection - the HttpSessionCollection object for which the distribution controller is working
      • isSessionDistributed

        public boolean isSessionDistributed​(HttpSessionModel model)
        Determine if the HttpSession associated with the passed session model should be distributed. This method will only be called for sessions that are not already distributed.
        Specified by:
        isSessionDistributed in interface HttpSessionCollection.SessionDistributionController
        Parameters:
        model - the model for the HttpSession to evaluate for distribution
        Returns:
        true if the passed session model should be distributed
      • isSessionAttributeDistributed

        public boolean isSessionAttributeDistributed​(HttpSessionModel model,
                                                     String sName)
        Determine if the specified attribute of the HttpSession associated with the passed session model should be distributed. This method will only be called for sessions that are distributed, and only for attributes that are not already distributed. Further, it may only be called when an attribute is added or when its value is modified. The value itself is not passed for performance reasons; if necessary, the implementation can obtain the value from the model, but it is suggested that the implementation use the name to make the determination if possible, and only failing that obtain and evaluate the attribute value.
        Specified by:
        isSessionAttributeDistributed in interface HttpSessionCollection.SessionDistributionController
        Parameters:
        model - the model for the HttpSession being evaluated
        sName - the name of the session attribute to evaluate for distribution
        Returns:
        true if the specified attribute for the passed session model should be distributed
      • addLocalClass

        public void addLocalClass​(Class c)
        Add a class which should never be distributed in the coherence cache.
        Parameters:
        c - the class which is not be distrubted