Class DefaultPollContext

    • Field Detail

      • DISABLE_POLL_TIMESTAMP_TRACKING

        public static final boolean DISABLE_POLL_TIMESTAMP_TRACKING
        Poll timestamps are updated using a DB transaction in the same thread and immediately following the poll. This may cause unnecessary overhead in extreme cases, so we add the ability to disable this functionality.
    • Constructor Detail

      • DefaultPollContext

        public DefaultPollContext()
    • Method Detail

      • setEventManager

        public void setEventManager​(EventIpcManager eventManager)

        setEventManager

        Parameters:
        eventManager - a EventIpcManager object.
      • setLocalHostName

        public void setLocalHostName​(java.lang.String localHostName)

        setLocalHostName

        Parameters:
        localHostName - a String object.
      • getLocalHostName

        public java.lang.String getLocalHostName()

        getLocalHostName

        Returns:
        a String object.
      • getName

        public java.lang.String getName()

        getName

        Specified by:
        getName in interface EventListener
        Returns:
        a String object.
      • setName

        public void setName​(java.lang.String name)

        setName

        Parameters:
        name - a String object.
      • setPollerConfig

        public void setPollerConfig​(PollerConfig pollerConfig)

        setPollerConfig

        Parameters:
        pollerConfig - a PollerConfig object.
      • setQueryManager

        public void setQueryManager​(QueryManager queryManager)

        setQueryManager

        Parameters:
        queryManager - a QueryManager object.
      • setLocationAwarePingClient

        public void setLocationAwarePingClient​(LocationAwarePingClient locationAwarePingClient)
      • getCriticalServiceName

        public java.lang.String getCriticalServiceName()

        getCriticalServiceName

        Specified by:
        getCriticalServiceName in interface PollContext
        Returns:
        a String object.
      • isNodeProcessingEnabled

        public boolean isNodeProcessingEnabled()

        isNodeProcessingEnabled

        Specified by:
        isNodeProcessingEnabled in interface PollContext
        Returns:
        a boolean.
      • sendEvent

        public PollEvent sendEvent​(Event event)

        sendEvent

        Specified by:
        sendEvent in interface PollContext
        Parameters:
        event - the event to send
        Returns:
        the same event
      • createEvent

        public Event createEvent​(java.lang.String uei,
                                 int nodeId,
                                 java.net.InetAddress address,
                                 java.lang.String svcName,
                                 java.util.Date date,
                                 java.lang.String reason)

        createEvent

        Specified by:
        createEvent in interface PollContext
        Parameters:
        uei - a String object.
        nodeId - a int.
        address - a InetAddress object.
        svcName - a String object.
        date - a Date object.
        reason - a String object.
        Returns:
        a Event object.
      • isServiceUnresponsiveEnabled

        public boolean isServiceUnresponsiveEnabled()

        isServiceUnresponsiveEnabled

        Specified by:
        isServiceUnresponsiveEnabled in interface PollContext
        Returns:
        a boolean.