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

com.netflix.astyanax.recipes.queue.MessageQueueHooks Maven / Gradle / Ivy

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

import java.util.Collection;

import com.netflix.astyanax.MutationBatch;

/**
 * This interface provides a hook to piggyback on top of the executed mutation
 * for each stage of processing
 * 
 * @author elandau
 *
 */
public interface MessageQueueHooks {
    /**
     * Called after tasks are read from the queue and before the mutation
     * for updating their state is committed.
     * 
     * @param messages
     * @param mb
     */
    void beforeAckMessages(Collection messages, MutationBatch mb);

    /**
     * Called before a task is released from the queue
     * 
     * @param message
     * @param mb
     */
    void beforeAckMessage(Message message, MutationBatch mb);

    /**
     * Called before a task is inserted in the queue
     * @param message
     * @param mb
     */
    void beforeSendMessage(Message message, MutationBatch mb);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy