Class Config.Builder

  • Enclosing class:
    Config

    public static final class Config.Builder
    extends Object
    • Method Detail

      • setPerContainerCpu

        public Config.Builder setPerContainerCpu​(double perContainerCpu)
        Sets the per-container (per-instance) CPU to be used by this topology
        Parameters:
        perContainerCpu - Per-container (per-instance) CPU as a double
      • setPerContainerRam

        public Config.Builder setPerContainerRam​(long perContainerRam)
        Sets the per-container (per-instance) RAM to be used by this topology
        Parameters:
        perContainerRam - Per-container (per-instance) RAM expressed as a Long.
      • setPerContainerRamInBytes

        public Config.Builder setPerContainerRamInBytes​(long perContainerRam)
        Sets the per-container (per-instance) RAM to be used by this topology as a number of bytes
        Parameters:
        perContainerRam - Per-container (per-instance) RAM expressed as a Long.
      • setPerContainerRamInMegabytes

        public Config.Builder setPerContainerRamInMegabytes​(long perContainerRamMB)
        Sets the per-container (per-instance) RAM to be used by this topology in megabytes
        Parameters:
        perContainerRamMB - Per-container (per-instance) RAM expressed as a Long.
      • setPerContainerRamInGigabytes

        public Config.Builder setPerContainerRamInGigabytes​(long perContainerRamGB)
        Sets the per-container (per-instance) RAM to be used by this topology in gigabytes
        Parameters:
        perContainerRamGB - Per-container (per-instance) RAM expressed as a Long.
      • setNumContainers

        public Config.Builder setNumContainers​(int numContainers)
        Sets the number of containers to run this topology
        Parameters:
        numContainers - The number of containers across which to distribute this topology
      • setDeliverySemantics

        public Config.Builder setDeliverySemantics​(Config.DeliverySemantics semantics)
        Sets the delivery semantics of the topology
        Parameters:
        semantics - The delivery semantic to be enforced
      • setUserConfig

        public Config.Builder setUserConfig​(String key,
                                            Object value)
        Sets some user-defined key/value mapping
        Parameters:
        key - The user-defined key
        value - The user-defined value
      • setSerializer

        public Config.Builder setSerializer​(Config.Serializer topologySerializer)
        Sets the Config.Serializer to be used by the topology (current options are KryoSerializer and the native Java serializer.
        Parameters:
        topologySerializer - The data serializer to use for streamlet elements in the topology.
      • build

        public Config build()