Class ConfEPid

Object
com.tailf.proto.ConfEObject
com.tailf.proto.ConfEPid
All Implemented Interfaces:
Serializable, Cloneable

public class ConfEPid extends ConfEObject implements Serializable, Cloneable
Provides a Java representation of E pids.
See Also:
  • Constructor Details

    • ConfEPid

      public ConfEPid(ConfInputStream buf) throws ConfEDecodeException
      Create an E pid from a stream containing a pid encoded in E external format.
      Parameters:
      buf - the stream containing the encoded ref.
      Throws:
      ConfEDecodeException - if the buffer does not contain a valid external representation of an E ref.
    • ConfEPid

      public ConfEPid(String node, int id, int serial, int creation, boolean isNew)
  • Method Details

    • id

      public int id()
      Get the id number from the pid.
      Returns:
      the id number from the pid.
    • serial

      public int serial()
      Get the serial number from the pid
      Returns:
      the serial.
    • creation

      public int creation()
      Get the creation number from the pid
      Returns:
      the creation.
    • node

      public String node()
      Get the node from the pid.
      Returns:
      the node from the pid.
    • toString

      public String toString()
      Get the string representation of the pid. E pids are printed as <node.generation.id>
      Specified by:
      toString in class ConfEObject
      Returns:
      the string representation of the pid.
    • encode

      public void encode(ConfOutputStream buf)
      Convert this pid to the equivalent E external representation.
      Specified by:
      encode in class ConfEObject
      Parameters:
      buf - an output stream to which the encoded pid should be written.
    • equals

      public boolean equals(Object o)
      Determine if two pids are equal. Pids are equal if their components are equal.
      Specified by:
      equals in class ConfEObject
      Parameters:
      o - the other pid to compare to.
      Returns:
      true if the pids are equal, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Object clone()
      Overrides:
      clone in class ConfEObject