Class PollableElement

    • Method Detail

      • getScope

        public Scope getScope()

        getScope

        Returns:
        a Scope object.
      • isStatusChanged

        public boolean isStatusChanged()

        isStatusChanged

        Returns:
        a boolean.
      • updateStatus

        public void updateStatus​(PollStatus newStatus)

        updateStatus

        Parameters:
        newStatus - a PollStatus object.
      • resetStatusChanged

        public void resetStatusChanged()

        resetStatusChanged

      • recalculateStatus

        public void recalculateStatus()

        recalculateStatus

      • obtainTreeLock

        protected void obtainTreeLock()

        obtainTreeLock

      • obtainTreeLock

        protected void obtainTreeLock​(long timeout)
                               throws LockUnavailable

        obtainTreeLock

        Parameters:
        timeout - Lock timeout in milliseconds
        Throws:
        LockUnavailable
      • releaseTreeLock

        protected void releaseTreeLock()

        releaseTreeLock

      • withTreeLock

        public final void withTreeLock​(java.lang.Runnable r)

        withTreeLock

        Parameters:
        r - a Runnable object.
      • withTreeLock

        protected final <T> T withTreeLock​(java.util.concurrent.Callable<T> c)

        withTreeLock

        Type Parameters:
        T - a T object.
        Parameters:
        c - a Callable object.
        Returns:
        a T object.
      • withTreeLock

        protected final void withTreeLock​(java.lang.Runnable r,
                                          long timeout)
                                   throws LockUnavailable

        withTreeLock

        Parameters:
        r - a Runnable object.
        timeout - Lock timeout in milliseconds
        Throws:
        LockUnavailable
      • withTreeLock

        protected final <T> T withTreeLock​(java.util.concurrent.Callable<T> c,
                                           long timeout)
                                    throws LockUnavailable

        withTreeLock

        Type Parameters:
        T - a T object.
        Parameters:
        c - a Callable object.
        timeout - Lock timeout in milliseconds
        Returns:
        a T object.
        Throws:
        LockUnavailable
      • createDownEvent

        public abstract Event createDownEvent​(java.util.Date date)

        createDownEvent

        Parameters:
        date - a Date object.
        Returns:
        a Event object.
      • createUpEvent

        public abstract Event createUpEvent​(java.util.Date date)

        createUpEvent

        Parameters:
        date - a Date object.
        Returns:
        a Event object.
      • createOutage

        protected void createOutage​(PollEvent cause)

        createOutage

        Parameters:
        cause - TODO
      • resolveOutage

        protected void resolveOutage​(PollEvent resolution)

        resolveOutage

        Parameters:
        resolution - TODO
      • hasOpenOutage

        public boolean hasOpenOutage()

        hasOpenOutage

        Returns:
        a boolean.
      • setCause

        public void setCause​(PollEvent cause)

        setCause

        Parameters:
        cause - a PollEvent object.
      • processStatusChange

        public void processStatusChange​(java.util.Date date)

        processStatusChange

        Parameters:
        date - a Date object.
      • processComingUp

        protected void processComingUp​(java.util.Date date)

        processComingUp

        Parameters:
        date - a Date object.
      • processResolution

        protected void processResolution​(PollEvent cause,
                                         PollEvent resolution)

        processResolution

        Parameters:
        cause - a PollEvent object.
        resolution - a PollEvent object.
      • processGoingDown

        protected void processGoingDown​(java.util.Date date)

        processGoingDown

        Parameters:
        date - a Date object.
      • processCause

        protected void processCause​(PollEvent cause)

        processCause

        Parameters:
        cause - a PollEvent object.
      • resolveAllOutages

        protected void resolveAllOutages​(PollEvent resolvedCause,
                                         PollEvent resolution)

        resolveAllOutages

        Parameters:
        resolvedCause - a PollEvent object.
        resolution - a PollEvent object.
      • isDeleted

        public boolean isDeleted()

        isDeleted

        Returns:
        a boolean.
      • delete

        public void delete()

        delete

      • processLingeringCauses

        protected void processLingeringCauses​(PollEvent resolvedCause,
                                              PollEvent resolution)

        processLingeringCauses

        Parameters:
        resolvedCause - a PollEvent object.
        resolution - a PollEvent object.
      • extrapolateCause

        public PollEvent extrapolateCause()

        extrapolateCause

        Returns:
        a PollEvent object.
      • doExtrapolateCause

        protected PollEvent doExtrapolateCause()

        doExtrapolateCause

        Returns:
        a PollEvent object.
      • inheritParentalCause

        public void inheritParentalCause()

        inheritParentalCause

      • doInheritParentalCause

        protected void doInheritParentalCause()

        doInheritParentalCause