com.wavefront.agent.handlers.SenderTaskFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proxy-test Show documentation
Show all versions of proxy-test Show documentation
Service for batching and relaying metric traffic to Wavefront
package com.wavefront.agent.handlers;
import com.wavefront.agent.data.QueueingReason;
import java.util.Collection;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* Factory for {@link SenderTask} objects.
*
* @author [email protected]
*/
public interface SenderTaskFactory {
/**
* Create a collection of {@link SenderTask objects} for a specified handler key.
*
* @param handlerKey unique identifier for the handler.
* @return created tasks.
*/
Collection> createSenderTasks(@Nonnull HandlerKey handlerKey);
/**
* Shut down all tasks.
*/
void shutdown();
/**
* Shut down specific pipeline
* @param handle pipeline's handle
*/
void shutdown(@Nonnull String handle);
/**
* Drain memory buffers to queue for all tasks.
*
* @param reason reason for queueing
*/
void drainBuffersToQueue(@Nullable QueueingReason reason);
void truncateBuffers();
}