org.jgroups.protocols.relay
Class SiteMaster

java.lang.Object
  extended by org.jgroups.util.UUID
      extended by org.jgroups.protocols.relay.SiteUUID
          extended by org.jgroups.protocols.relay.SiteMaster
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Comparable<Address>, Address, SiteAddress, Streamable

public class SiteMaster
extends SiteUUID

Special address with the UUID part being 0: identifies the current (relay) coordinator of a given site. E,g, if we send a message with dest=SiteMaster(SFO) from site LON, then the message will be forwarded to the relay coordinator of the SFO site

Since:
3.2
Author:
Bela Ban
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jgroups.protocols.relay.SiteUUID
name, site, site_cache
 
Fields inherited from class org.jgroups.util.UUID
cache, leastSigBits, mostSigBits, numberGenerator, print_function, print_uuids, SIZE
 
Fields inherited from interface org.jgroups.Address
IP_ADDR, NULL, SITE_MASTER, SITE_UUID, UUID_ADDR
 
Constructor Summary
SiteMaster()
           
SiteMaster(short site)
           
SiteMaster(java.lang.String site)
           
 
Method Summary
 int compareTo(Address other)
          Compares this UUID with the specified UUID.
 UUID copy()
           
 boolean equals(java.lang.Object obj)
          Compares this object to the specified object.
 int hashCode()
          Returns a hash code for this UUID.
 java.lang.String toString()
           
 
Methods inherited from class org.jgroups.protocols.relay.SiteUUID
addToCache, cacheValues, clearCache, getName, getSite, getSite, getSiteName, hasCacheValues, readExternal, readFrom, replaceInCache, size, writeExternal, writeTo
 
Methods inherited from class org.jgroups.util.UUID
add, add, digits, get, getContents, getLeastSignificantBits, getMostSignificantBits, printCache, randomUUID, remove, removeAll, retainAll, toStringLong
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SiteMaster

public SiteMaster()

SiteMaster

public SiteMaster(short site)

SiteMaster

public SiteMaster(java.lang.String site)
Method Detail

compareTo

public int compareTo(Address other)
Description copied from class: UUID
Compares this UUID with the specified UUID.

The first of two UUIDs is greater than the second if the most significant field in which the UUIDs differ is greater for the first UUID.

Specified by:
compareTo in interface java.lang.Comparable<Address>
Overrides:
compareTo in class UUID
Parameters:
other - UUID to which this UUID is to be compared
Returns:
-1, 0 or 1 as this UUID is less than, equal to, or greater than val

equals

public boolean equals(java.lang.Object obj)
Description copied from class: UUID
Compares this object to the specified object. The result is true if and only if the argument is not null, is a UUID object, has the same variant, and contains the same value, bit for bit, as this UUID.

Overrides:
equals in class UUID
Parameters:
obj - The object to be compared
Returns:
true if the objects are the same; false otherwise

hashCode

public int hashCode()
Description copied from class: UUID
Returns a hash code for this UUID.

Overrides:
hashCode in class UUID
Returns:
A hash code value for this UUID

copy

public UUID copy()
Overrides:
copy in class SiteUUID

toString

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


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.