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

com.wavefront.agent.handlers.SenderTaskFactory Maven / Gradle / Ivy

There is a newer version: 9999.0
Show newest version
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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy