Package com.tailf.proto
Class ConfEPid
Object
com.tailf.proto.ConfEObject
com.tailf.proto.ConfEPid
- All Implemented Interfaces:
Serializable
,Cloneable
Provides a Java representation of E pids.
- See Also:
-
Constructor Summary
ConstructorDescriptionConfEPid
(ConfInputStream buf) Create an E pid from a stream containing a pid encoded in E external format. -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
creation()
Get the creation number from the pidvoid
encode
(ConfOutputStream buf) Convert this pid to the equivalent E external representation.boolean
Determine if two pids are equal.int
hashCode()
int
id()
Get the id number from the pid.node()
Get the node from the pid.int
serial()
Get the serial number from the pidtoString()
Get the string representation of the pid.Methods inherited from class com.tailf.proto.ConfEObject
decode
-
Constructor Details
-
ConfEPid
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
-
-
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
Get the node from the pid.- Returns:
- the node from the pid.
-
toString
Get the string representation of the pid. E pids are printed as <node.generation.id>- Specified by:
toString
in classConfEObject
- Returns:
- the string representation of the pid.
-
encode
Convert this pid to the equivalent E external representation.- Specified by:
encode
in classConfEObject
- Parameters:
buf
- an output stream to which the encoded pid should be written.
-
equals
Determine if two pids are equal. Pids are equal if their components are equal.- Specified by:
equals
in classConfEObject
- Parameters:
o
- the other pid to compare to.- Returns:
- true if the pids are equal, false otherwise.
-
hashCode
public int hashCode() -
clone
- Overrides:
clone
in classConfEObject
-