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: 4.36
Show newest version
package com.wavefront.agent.handlers;

import com.wavefront.agent.data.QueueingReason;
import java.util.Collection;
import java.util.Map;
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 corresponding to different Wavefront endpoints {@link
   *     com.wavefront.api.ProxyV2API}.
   */
   Map>> 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 - 2025 Weber Informatics LLC | Privacy Policy