ace-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toni Menzel (JIRA)" <j...@apache.org>
Subject [jira] Updated: (ACE-52) Repeat-aware Helper
Date Wed, 07 Oct 2009 19:45:31 GMT

     [ https://issues.apache.org/jira/browse/ACE-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Toni Menzel updated ACE-52:
---------------------------

    Attachment: ACE-52.patch

Ok, this solution works a bit like a semaphore.
Basically make sure to do things just "once" with calling "once()" until someone calls "fixed()"
to basically unlock it. Until this time, all calls to "once()" will be denied.

The RecurringProblem class can be used like so:

{code}
..
if (host == null) {
           if (m_delay.once()) {
                m_log.log(LogService.LOG_WARNING, "Unable to synchronize log with remote (endpoint="
+ m_endpoint + ") - none available");
            }
            return;
        }
        m_delay.fixed();
{code}

So, now, it happens that logic is more complex and there is more than one problem to be "observed".
Thats why the once()+fixed() combo has once(int)+fixed(int) versions. 
This (int) is just a signature to match "once" calls with "fixed()" calls.

Just have a look at the patched LogSyncTask for an example.




> Repeat-aware Helper
> -------------------
>
>                 Key: ACE-52
>                 URL: https://issues.apache.org/jira/browse/ACE-52
>             Project: Ace
>          Issue Type: Test
>            Reporter: Toni Menzel
>         Attachments: ACE-52.patch
>
>
> Ace has some tasks running that do log things repeatingly all over again, even if the
situation has not changed a bit at all (since last second for exampe).
> For users this is more annoying that useful. See ACE-35,ACE-37.
> Patch to come.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message