Class IpAddressUUID

  • All Implemented Interfaces:
    java.lang.Comparable<Address>, Address, Constructable<IpAddress>, PhysicalAddress, SizeStreamable, Streamable

    public class IpAddressUUID
    extends IpAddress
    IpAddress with a 'semi'-UUID to prevent reincarnation when the port is fixed. The randomness is given through a long and an int. On 64-bit architectures, this increases the memory size from 24 to 32 bytes per instance.

    See https://issues.jboss.org/browse/JGRP-2080 for details

    Since:
    4.0
    Author:
    Bela Ban
    • Field Detail

      • low

        protected long low
      • high

        protected int high
    • Constructor Detail

      • IpAddressUUID

        public IpAddressUUID()
      • IpAddressUUID

        public IpAddressUUID​(java.lang.String addr_port)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • IpAddressUUID

        public IpAddressUUID​(java.net.InetAddress i,
                             int p)
      • IpAddressUUID

        public IpAddressUUID​(java.lang.String i,
                             int p)
                      throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
      • IpAddressUUID

        public IpAddressUUID​(int port)
      • IpAddressUUID

        public IpAddressUUID​(int port,
                             boolean set_default_host)
      • IpAddressUUID

        public IpAddressUUID​(java.net.InetSocketAddress sock_addr)
      • IpAddressUUID

        protected IpAddressUUID​(java.net.InetAddress i,
                                int p,
                                long low,
                                int high)
    • Method Detail

      • compareTo

        public int compareTo​(Address o)
        Description copied from class: IpAddress
        implements the java.lang.Comparable interface
        Specified by:
        compareTo in interface java.lang.Comparable<Address>
        Overrides:
        compareTo in class IpAddress
        Parameters:
        o - - the Object to be compared
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        See Also:
        Comparable
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class IpAddress
      • writeTo

        public void writeTo​(java.io.DataOutput out)
                     throws java.io.IOException
        Description copied from interface: Streamable
        Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed
        Specified by:
        writeTo in interface Streamable
        Overrides:
        writeTo in class IpAddress
        Throws:
        java.io.IOException
      • readFrom

        public void readFrom​(java.io.DataInput in)
                      throws java.io.IOException
        Description copied from interface: Streamable
        Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
        Specified by:
        readFrom in interface Streamable
        Overrides:
        readFrom in class IpAddress
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class IpAddress
      • toString

        public java.lang.String toString​(boolean detailed)
      • createUUID

        protected static long[] createUUID()