Class MemberBuilder

java.lang.Object
io.atomix.cluster.NodeBuilder
io.atomix.cluster.MemberBuilder
All Implemented Interfaces:
Builder<Node>

public class MemberBuilder extends NodeBuilder
Member builder.
  • Field Details

  • Constructor Details

    • MemberBuilder

      protected MemberBuilder(MemberConfig config)
  • Method Details

    • withId

      public MemberBuilder withId(String id)
      Description copied from class: NodeBuilder
      Sets the node identifier.
      Overrides:
      withId in class NodeBuilder
      Parameters:
      id - the node identifier
      Returns:
      the node builder
    • withId

      public MemberBuilder withId(NodeId id)
      Description copied from class: NodeBuilder
      Sets the node identifier.
      Overrides:
      withId in class NodeBuilder
      Parameters:
      id - the node identifier
      Returns:
      the node builder
    • withHost

      public MemberBuilder withHost(String host)
      Description copied from class: NodeBuilder
      Sets the node host.
      Overrides:
      withHost in class NodeBuilder
      Parameters:
      host - the node host
      Returns:
      the node builder
    • withPort

      public MemberBuilder withPort(int port)
      Description copied from class: NodeBuilder
      Sets the node port.
      Overrides:
      withPort in class NodeBuilder
      Parameters:
      port - the node port
      Returns:
      the node builder
    • withAddress

      public MemberBuilder withAddress(Address address)
      Sets the member address.
      Overrides:
      withAddress in class NodeBuilder
      Parameters:
      address - the member address
      Returns:
      the member builder
    • build

      public Member build()
      Specified by:
      build in interface Builder<Node>
      Overrides:
      build in class NodeBuilder
    • withId

      public MemberBuilder withId(MemberId id)
      Sets the member identifier.
      Parameters:
      id - the member identifier
      Returns:
      the member builder
    • withZoneId

      public MemberBuilder withZoneId(String zoneId)
      Sets the zone to which the member belongs.
      Parameters:
      zoneId - the zone to which the member belongs
      Returns:
      the member builder
    • withRackId

      public MemberBuilder withRackId(String rack)
      Sets the rack to which the member belongs.
      Parameters:
      rack - the rack to which the member belongs
      Returns:
      the member builder
    • withHostId

      public MemberBuilder withHostId(String hostId)
      Sets the host to which the member belongs.
      Parameters:
      hostId - the host to which the member belongs
      Returns:
      the member builder
    • withProperties

      public MemberBuilder withProperties(Properties properties)
      Sets the member properties.
      Parameters:
      properties - the member properties
      Returns:
      the member builder
      Throws:
      NullPointerException - if the properties are null