Class HttpPostSinkActor

java.lang.Object
akka.actor.AbstractActor
akka.actor.AbstractActorWithTimers
com.arpnetworking.tsdcore.sinks.HttpPostSinkActor
All Implemented Interfaces:
akka.actor.Actor, akka.actor.Timers

public class HttpPostSinkActor extends akka.actor.AbstractActorWithTimers
Actor that sends HTTP requests via a Ning HTTP client.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Message class to wrap a list of AggregatedData.

    Nested classes/interfaces inherited from class akka.actor.AbstractActor

    akka.actor.AbstractActor.ActorContext, akka.actor.AbstractActor.Receive

    Nested classes/interfaces inherited from interface akka.actor.Actor

    akka.actor.Actor.emptyBehavior$, akka.actor.Actor.ignoringBehavior$
  • Constructor Summary

    Constructors
    Constructor
    Description
    HttpPostSinkActor(org.asynchttpclient.AsyncHttpClient client, HttpPostSink sink, int maximumConcurrency, int maximumQueueSize, Duration spreadPeriod, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
    Public constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    akka.actor.AbstractActor.Receive
     
    void
     
    void
    preRestart(Throwable reason, Optional<Object> message)
     
    void
     
    static akka.actor.Props
    props(org.asynchttpclient.AsyncHttpClient client, HttpPostSink sink, int maximumConcurrency, int maximumQueueSize, Duration spreadPeriod, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
    Factory method to create a Props.
    Generate a Steno log compatible representation.
     

    Methods inherited from class akka.actor.AbstractActorWithTimers

    akka$actor$Timers$_setter_$akka$actor$Timers$$_timers_$eq, akka$actor$Timers$$_timers, aroundPostStop, aroundPreRestart, aroundReceive, getTimers, timers

    Methods inherited from class akka.actor.AbstractActor

    akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPreStart, context, emptyBehavior, getContext, getSelf, getSender, postRestart, preRestart, receive, receiveBuilder, self, sender, supervisorStrategy, unhandled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface akka.actor.Actor

    akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPreStart, context, postRestart, preRestart, receive, self, sender, supervisorStrategy, unhandled
  • Constructor Details

    • HttpPostSinkActor

      public HttpPostSinkActor(org.asynchttpclient.AsyncHttpClient client, HttpPostSink sink, int maximumConcurrency, int maximumQueueSize, Duration spreadPeriod, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
      Public constructor.
      Parameters:
      client - Http client to create requests from.
      sink - Sink that controls request creation and data serialization.
      maximumConcurrency - Maximum number of concurrent requests.
      maximumQueueSize - Maximum number of pending requests.
      spreadPeriod - Maximum time to delay sending new aggregates to spread load.
      periodicMetrics - Periodic Metrics to record metrics for the actor.
  • Method Details

    • props

      public static akka.actor.Props props(org.asynchttpclient.AsyncHttpClient client, HttpPostSink sink, int maximumConcurrency, int maximumQueueSize, Duration spreadPeriod, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
      Factory method to create a Props.
      Parameters:
      client - Http client to create requests from.
      sink - Sink that controls request creation and data serialization.
      maximumConcurrency - Maximum number of concurrent requests.
      maximumQueueSize - Maximum number of pending requests.
      spreadPeriod - Maximum time to delay sending new aggregates to spread load.
      periodicMetrics - Periodic Metrics to record metrics for the actor.
      Returns:
      A new Props
    • preStart

      public void preStart() throws Exception
      Specified by:
      preStart in interface akka.actor.Actor
      Overrides:
      preStart in class akka.actor.AbstractActor
      Throws:
      Exception
    • postStop

      public void postStop() throws Exception
      Specified by:
      postStop in interface akka.actor.Actor
      Overrides:
      postStop in class akka.actor.AbstractActor
      Throws:
      Exception
    • preRestart

      public void preRestart(Throwable reason, Optional<Object> message) throws Exception
      Overrides:
      preRestart in class akka.actor.AbstractActor
      Throws:
      Exception
    • toLogValue

      public Object toLogValue()
      Generate a Steno log compatible representation.
      Returns:
      Steno log compatible representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • createReceive

      public akka.actor.AbstractActor.Receive createReceive()
      Specified by:
      createReceive in class akka.actor.AbstractActor