Class ActorSource

java.lang.Object
com.arpnetworking.metrics.common.sources.BaseSource
com.arpnetworking.metrics.common.sources.ActorSource
All Implemented Interfaces:
com.arpnetworking.commons.observer.Observable, Source
Direct Known Subclasses:
BaseTcpSource, HttpSource, StatsdSource

public abstract class ActorSource extends BaseSource
Serves as a base class for actor-based sources.
Author:
Brandon Arp (brandon dot arp at smartsheet dot com)
  • Constructor Details

  • Method Details

    • start

      public void start()
      Description copied from interface: Source
      Called to allow the source to start producing records.
    • stop

      public void stop()
      Description copied from interface: Source
      Called to allow the source to clean-up. No further records should be produced.
    • getActorSystem

      protected org.apache.pekko.actor.ActorSystem getActorSystem()
      Return the ActorSystem used by this source.
      Returns:
      The ActorSystem used by this source.
    • getActor

      protected org.apache.pekko.actor.ActorRef getActor()
      Return an ActorRef to this source's Pekko actor.
      Returns:
      An ActorRef to this source's Pekko actor.
    • createProps

      protected abstract org.apache.pekko.actor.Props createProps()
      Create a props for the actor to be created at the provided path.
      Returns:
      A props to create the actor with.