org.jgroups.protocols.relay
public class SiteUUID extends UUID implements SiteAddress
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected short |
site |
protected static ConcurrentMap<Short,String> |
site_cache |
cache, leastSigBits, mostSigBits, numberGenerator, print_function, print_uuids, SIZE
Constructor and Description |
---|
SiteUUID() |
SiteUUID(long mostSigBits,
long leastSigBits,
String name,
short site) |
SiteUUID(UUID uuid,
String name,
short site) |
Modifier and Type | Method and Description |
---|---|
static void |
addToCache(short site,
String name) |
static void |
clearCache() |
UUID |
copy() |
String |
getName() |
short |
getSite()
Returns the ID of the site (all sites need to have a unique site ID)
|
protected static short |
getSite(String site_name) |
static String |
getSiteName(short site) |
void |
readExternal(ObjectInput in) |
void |
readFrom(DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
static void |
replaceInCache(short site,
String name) |
int |
size()
Returns serialized size of this address
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
void |
writeTo(DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
add, add, compareTo, digits, equals, get, getContents, getLeastSignificantBits, getMostSignificantBits, hashCode, printCache, randomUUID, remove, removeAll, retainAll, toStringLong
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo
protected String name
protected short site
protected static final ConcurrentMap<Short,String> site_cache
public SiteUUID()
public SiteUUID(long mostSigBits, long leastSigBits, String name, short site)
public String getName()
public static void addToCache(short site, String name)
public static void replaceInCache(short site, String name)
public static String getSiteName(short site)
public static void clearCache()
public short getSite()
SiteAddress
getSite
in interface SiteAddress
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class UUID
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class UUID
IOException
public void readFrom(DataInput in) throws Exception
Streamable
readFrom
in interface Streamable
readFrom
in class UUID
Exception
public void writeTo(DataOutput out) throws Exception
Streamable
writeTo
in interface Streamable
writeTo
in class UUID
Exception
public int size()
Address
protected static short getSite(String site_name)
Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.