StaticMember (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.tribes.membership, class: StaticMember

# Class StaticMember

java.lang.Object
org.apache.catalina.tribes.membership.MemberImpl
org.apache.catalina.tribes.membership.StaticMember

All Implemented Interfaces:
  `Externalizable, Serializable, Member`

public class StaticMember extends MemberImpl
Static member representation for cluster membership.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class MemberImpl

  `command, dataPkg, domain, host, hostname, local, memberAliveTime, msgCount, payload, port, securePort, serviceStartTime, sm, TRIBES_MBR_BEGIN, TRIBES_MBR_END, udpPort, uniqueId`

  ### Fields inherited from interface Member

  `SHUTDOWN_PAYLOAD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StaticMember()`
  Default constructor.
  `StaticMember(String host, int port, long aliveTime)`
  Creates a static member with the given host, port, and alive time.
  `StaticMember(String host, int port, long aliveTime, byte[] payload)`
  Creates a static member with the given host, port, alive time, and payload.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setDomain(String domain)`
  Sets the domain for this member.
  `void`
  `setHost(String host)`
  Sets the host for this member.
  `void`
  `setUniqueId(String id)`
  Sets the unique identifier for this member.

  ### Methods inherited from class MemberImpl

  `bToS, bToS, equals, getCommand, getData, getData, getData, getDataLength, getDomain, getHost, getHostname, getMember, getMember, getMember, getMember, getMemberAliveTime, getMsgCount, getName, getPayload, getPort, getSecurePort, getServiceStartTime, getUdpPort, getUniqueId, hashCode, inc, isFailing, isLocal, isReady, isSuspect, readExternal, setCommand, setDomain, setHost, setHostname, setLocal, setMemberAliveTime, setMsgCount, setPayload, setPort, setSecurePort, setServiceStartTime, setUdpPort, setUniqueId, toString, writeExternal`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### StaticMember

    public StaticMember()
    Default constructor.

  - ### StaticMember

    public StaticMember(String host, int port, long aliveTime) throws IOException
    Creates a static member with the given host, port, and alive time.
    Parameters:
      `host` - the host address
      `port` - the port number
      `aliveTime` - the time the member was last alive
    Throws:
      `IOException` - if serialization fails

  - ### StaticMember

    public StaticMember(String host, int port, long aliveTime, byte[] payload) throws IOException
    Creates a static member with the given host, port, alive time, and payload.
    Parameters:
      `host` - the host address
      `port` - the port number
      `aliveTime` - the time the member was last alive
      `payload` - the member payload data
    Throws:
      `IOException` - if serialization fails

- ## Method Details

  - ### setHost

    public void setHost(String host)
    Sets the host for this member.
    Parameters:
      `host` - String, either in byte array string format, like {214,116,1,3} or as a regular hostname, 127.0.0.1 or tomcat01.mydomain.com

  - ### setDomain

    public void setDomain(String domain)
    Sets the domain for this member.
    Parameters:
      `domain` - String, either in byte array string format, like {214,116,1,3} or as a regular string value like 'mydomain'. The latter will be converted using ISO-8859-1 encoding

  - ### setUniqueId

    public void setUniqueId(String id)
    Sets the unique identifier for this member.
    Parameters:
      `id` - String, must be in byte array string format, like {214,116,1,3} and exactly 16 bytes long