Class ActorSource.Builder<B extends ActorSource.Builder<B,S>,S extends Source>

java.lang.Object
com.arpnetworking.commons.builder.OvalBuilder<S>
com.arpnetworking.metrics.common.sources.BaseSource.Builder<B,S>
com.arpnetworking.metrics.common.sources.ActorSource.Builder<B,S>
Type Parameters:
B - type of the builder
S - type of the object to be built
All Implemented Interfaces:
com.arpnetworking.commons.builder.Builder<S>
Direct Known Subclasses:
BaseTcpSource.Builder, HttpSource.Builder, StatsdSource.Builder
Enclosing class:
ActorSource

public abstract static class ActorSource.Builder<B extends ActorSource.Builder<B,S>,S extends Source> extends BaseSource.Builder<B,S>
ActorSource BaseSource.Builder implementation.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io)
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Builder(Function<B,S> targetConstructor)
    Protected constructor for subclasses.
  • Method Summary

    Modifier and Type
    Method
    Description
    final B
    Sets the actor path.
    final B
    setActorSystem(akka.actor.ActorSystem value)
    Sets the actor system to launch the actor in.
    final B
    Sets the actor pool size.

    Methods inherited from class com.arpnetworking.metrics.common.sources.BaseSource.Builder

    self, setName

    Methods inherited from class com.arpnetworking.commons.builder.OvalBuilder

    build, clone, clone, construct, isSelfValidating, toString, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Builder

      protected Builder(Function<B,S> targetConstructor)
      Protected constructor for subclasses.
      Parameters:
      targetConstructor - The constructor for the concrete type to be created by this builder.
  • Method Details

    • setActorName

      public final B setActorName(String value)
      Sets the actor path. Cannot be null or empty.
      Parameters:
      value - The name.
      Returns:
      This instance of ActorSource.Builder
    • setActorSystem

      public final B setActorSystem(akka.actor.ActorSystem value)
      Sets the actor system to launch the actor in.
      Parameters:
      value - The actor system.
      Returns:
      This instance of ActorSource.Builder
    • setPoolSize

      public final B setPoolSize(Integer value)
      Sets the actor pool size.
      Parameters:
      value - Number of actors in the pool
      Returns:
      This instance of ActorSource.Builder