Class ElasticTopic

    • Field Detail

      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • isRoot

        private boolean isRoot
        True if topic is head of the elastic topic tree.
      • subId

        private int subId
        Index of topic to forward next subscription to.
    • Constructor Detail

      • ElasticTopic

        public ElasticTopic()
    • Method Detail

      • setProperties

        public void setProperties​(Properties properties,
                                  boolean firstTime)
                           throws Exception
        Description copied from class: Destination
        Sets the configuration of a Destination. Be careful, this is done a first time before Agent.deploy(), so the agent is serialized and initialized afterwards.
        After deployment, firstTime argument is set to false.
        Overrides:
        setProperties in class Destination
        Parameters:
        properties - The initial set of properties.
        Throws:
        Exception
      • react

        public void react​(AgentId from,
                          Notification not)
                   throws Exception
        Description copied from class: Topic
        Distributes the received notifications to the appropriate reactions.
        Overrides:
        react in class Topic
        Parameters:
        from - agent sending notification
        not - notification to react to
        Throws:
        Exception - unspecialized exception
      • doClientMessages

        protected void doClientMessages​(AgentId from,
                                        ClientMessages not,
                                        boolean throwsExceptionOnFullDest)
        Description copied from class: Topic
        Method specifically processing a ClientMessages instance.

        This method may forward the messages to the topic father if any, or to the cluster fellows if any.It may finally send TopicMsgsReply instances to the valid subscribers.

        Overrides:
        doClientMessages in class Topic
      • handleGetSubscriptionsRequest

        private void handleGetSubscriptionsRequest​(FwdAdminRequestNot not)
      • handleClientSubscriptionNot

        private void handleClientSubscriptionNot​(AgentId from,
                                                 ClientSubscriptionNot not)
        If root, redirects subscriptions to proper topic.
        Parameters:
        from - should be the local default user agent.
        not - Notification of a new client subscriptions.
      • createReconnectionMessage

        private Message createReconnectionMessage​(int tid)