All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.astyanax.recipes.queue.triggers.Trigger Maven / Gradle / Ivy

There is a newer version: 3.10.2
Show newest version
package com.netflix.astyanax.recipes.queue.triggers;

/**
 * Base interface for all triggers.  Triggers specify the scheduling for a task in the scheduler.
 * Different implementation of trigger can specify different triggering semantics.  
 * 
 * @author elandau
 *
 */
public interface Trigger {
    /**
     * Process the current trigger and give the next trigger to insert into the queue
     * 
     * @param trigger Current trigger
     * @return  New trigger or null to stop executing the trigger
     */
    Trigger nextTrigger();
    
    /**
     * Get the current trigger time for this trigger.  This is the time
     * for the next execution of the Task
     * @return
     */
    long getTriggerTime();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy