[ 
https://issues.apache.org/jira/browse/QUARKS-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248871#comment-15248871
 ] 

ASF GitHub Bot commented on QUARKS-124:
---------------------------------------

Github user ddebrunner commented on a diff in the pull request:

    https://github.com/apache/incubator-quarks/pull/91#discussion_r60327979
  
    --- Diff: 
analytics/sensors/src/main/java/quarks/analytics/sensors/Deadtime.java ---
    @@ -0,0 +1,98 @@
    +package quarks.analytics.sensors;
    +
    +import java.util.Date;
    +import java.util.Objects;
    +import java.util.concurrent.TimeUnit;
    +
    +import quarks.function.Predicate;
    +
    +/**
    + * A generic "deadtime" {@link Predicate}.
    + * <p>
    + * After accepting a tuple ({@link #test(Object) test()} returns true),
    + * any tuples received during the "deadtime" period are rejected
    + * ({@link #test(Object) test()} returns false).
    + * Then the next tuple is accepted and a new deadtime period begun.
    + * </p><p>
    + * The deadtime period may be changed while the topology is running
    + * via {@link #setPeriod(long, TimeUnit)}.
    + * </p>
    + *
    + * @param <T> tuple type
    + */
    +public class Deadtime<T> implements Predicate<T> {
    +    private static final long serialVersionUID = 1L;
    +    private transient long deadtimePeriod;
    --- End diff --
    
    Why are these fields transient?


> Add a recipe for changing the rate at which data is published
> -------------------------------------------------------------
>
>                 Key: QUARKS-124
>                 URL: https://issues.apache.org/jira/browse/QUARKS-124
>             Project: Quarks
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Dale LaBossiere
>            Assignee: Dale LaBossiere
>
> e.g., analytics are being continuously performed and new results generated 
> say every 1min but under "normal" conditions a "normal" result is only 
> published (equivalently an IotDevice event generated) every 30min.  Some 
> alert condition is detected by local analytics and the application wants to 
> start publishing the results every 1min.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to