|
Public Types
|
|
typedef spec::Handle |
Handle |
| |
UUID Handle definition.
|
|
typedef spec::View |
View |
| |
UUID View definition.
|
|
typedef spec::Holder |
Holder |
| |
UUID Holder definition.
|
Public Member Functions
|
| virtual bool |
isGenerated () const |
| |
True if the UUID was generated, and false if it was built.
|
| virtual int64_t |
getTimestamp () const |
| |
Determine the date/time value for the UUID.
|
| virtual bool |
isAddressIncluded () const |
| |
True if the IP address is a real IP address.
|
virtual Array
< octet_t >::View |
getAddress () const |
| |
Determine the internet address of the host that generated the UUID instance.
|
| virtual int32_t |
getPort () const |
| |
Determine the port portion of the UUID.
|
| virtual int32_t |
getCount () const |
| |
Determine the "counter" portion of the UUID that ensures that two UUIDs generated at the same exact time by the same process are unique.
|
virtual Array
< octet_t >::View |
toByteArray () const |
| |
Convert the UUID to a byte array of 32 bytes.
|
|
virtual int32_t |
compareTo (Object::View v) const |
| |
|
|
virtual void |
readExternal (PofReader::Handle hIn) |
| |
|
|
virtual void |
writeExternal (PofWriter::Handle hOut) const |
| |
|
|
virtual void |
toStream (std::ostream &out) const |
| |
Output a human-readable description of this Object to the given stream.
coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toStream method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents.
- Parameters:
-
|
out |
the stream used to output the description |
|
|
virtual bool |
equals (Object::View v) const |
| |
|
|
virtual size32_t |
hashCode () const |
| |
Return a hash code value for the Object.
This method is supported for the benefit of hash-based containers.
The general contract of hashCode is:
- Whenever it is invoked on the same Object more than once during an execution of an application, the
hashCode method must consistently return the same value, provided no information used in equals comparisons on the object is modified. This value need not remain consistent from one execution of an application to another execution of the same application.
- If two Objects are equal according to the
equals method, then calling the hashCode method on each of the two Objects must produce the same value.
- It is not required that if two Objects are unequal according to the
equals method, then calling the hashCode method on each of the two objects must produce distinct results. However, the programmer should be aware that producing distinct results for unequal objects may improve the performance of hash-based containers.
The default implementation is identity based.
- Returns:
- a hash code value for this Object
|
Protected Member Functions
|
|
|
UUID () |
| |
Generate a UUID.
|
| |
UUID (int64_t lDateTime, InetAddress::View vAddr, int32_t nPort, int32_t nCount) |
| |
Build a UUID from its constituent members (advanced constructor).
|
| |
UUID (int64_t lDateTime, Array< octet_t >::View vabIP, int32_t nPort, int32_t nCount) |
| |
Build a UUID from its constituent members (advanced constructor).
|
| |
UUID (String::View vs) |
| |
Construct a UUID from a String.
|
| |
UUID (Array< octet_t >::View vab) |
| |
Construct a UUID from a byte array.
|
Protected Attributes
|
|
int64_t |
m_lDateTime |
| |
System date/time value that the UUID instance was generated.
|
| int32_t |
m_nAddr1 |
| |
Internet address of host that generated the UUID instance.
|
| int32_t |
m_nAddr2 |
| |
The second four bytes of the IP address.
|
| int32_t |
m_nAddr3 |
| |
The third four bytes of the IP address.
|
| int32_t |
m_nAddr4 |
| |
The fourth four bytes of the IP address.
|
| int32_t |
m_nPort |
| |
The least significant two bytes of this value are the port number if the UUID is built (not generated).
|
|
int32_t |
m_nCount |
| |
A rolling counter.
|
| size32_t |
m_nHash |
| |
Cache the hash.
|
Static Protected Attributes
|
|
static const int32_t |
MASK_ALLFLAGS |
| |
A bit mask that represents the portion of the "port" value reserved for bit flags.
|
|
static const int32_t |
MASK_GENERATED |
| |
The bit mask for the "is generated UUID" flag.
|
|
static const int32_t |
MASK_REALADDR |
| |
The bit mask for the "is a real IP address" flag.
|
|
static const int32_t |
MASK_IPV6ADDR |
| |
The bit mask for the "is an IPv6 address" flag.
|
|
static const int32_t |
MASK_UNUSED |
| |
The one remaining bit for future use.
|