Interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>

    • Method Detail

      • getInfo

        java.lang.String getInfo()
      • nodeConnected

        void nodeConnected​(JID node)
        This is a handler method which is called when a new node connects to the cluster.
        node - is a cluster node id.
      • nodeDisconnected

        void nodeDisconnected​(JID node)
        This is a handler method which is called when a node disconnects from the cluster.
        node - is a cluster node id.
      • getNodesConnected

        java.util.List<JID> getNodesConnected()
        The method returns all cluster nodes currently connected to the cluster node.
        List of all cluster nodes currently connected to the cluster node.
      • getConnectionRecord

        E getConnectionRecord​(JID jid)
        Returns a ConnectionRecord object associated with this user's full JID if it exists in the cache or null if it does not. All parts of the user's JID are checked and ConnectionRecord is returned only if there is a match for all parts.
        jid - is an instance of the user's full JID.
        ConnectionRecord instance associated with given user's JID or null if there is no ConnectionRecord in the cache.
      • getConnectionRecordInstance

        E getConnectionRecordInstance()
      • getConnectionRecords

        java.util.Set<E> getConnectionRecords​(BareJID bareJID)
        Returns a set with all ConnectionRecords found in the cache for a given user ID, that is BareJID. In other words all user's resources/connectionIDs found in the cache associated with user's account.
        bareJID - is an instance of the user's BareJID, that is account ID.
        a Set instance with all ConnectionRecords found for a given BareJID. Note, the result may be null or it maybe an empty Set or non-empty set.
      • getConnectionRecordsByCreationTime

        default java.util.List<E> getConnectionRecordsByCreationTime​(BareJID bareJID)
      • getDefaults

        java.util.Map<java.lang.String,​java.lang.Object> getDefaults​(java.util.Map<java.lang.String,​java.lang.Object> params)
        This method is used for configuration purpose. Following the convention used in the Tigase project this method is supposed to provide configuration defaults. All parameters which exist in configuration file overwrite corresponding default parameters. If some parameters are missing in configuration file defaults are used then.
        A compiled set of parameters is then passed to setProperties method.
        params - a Map with properties loaded from file which should be used for generating defaults.
        a Map with all the class default configuration parameters.
      • getStatistics

        void getStatistics​(StatisticsList list)
        Add the strategy statistics to the List.
      • setProperties

        void setProperties​(java.util.Map<java.lang.String,​java.lang.Object> props)
        Method used to pass configuration parameters to the class. Parameters are stored in Map which contains compiles set of defaults overwritten by parameters loaded from configuration file.
        If he implementation took a good care of providing defaults for all parameters no parameter should be missing.
        props - a Map with all configuration parameters for the class.