Package org.jgroups.util
Class PayloadUUID
java.lang.Object
org.jgroups.util.UUID
org.jgroups.util.PayloadUUID
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Comparable<Address>,Address,Streamable
Subclass of
UUID which adds a string as payload. An instance of this can be fed to
JChannel.setAddressGenerator(org.jgroups.stack.AddressGenerator), with the address generator
creating PayloadUUIDs.- Author:
- Bela Ban
- See Also:
-
Field Summary
FieldsFields inherited from class org.jgroups.util.UUID
additional_data, cache, leastSigBits, mostSigBits, numberGenerator, print_function, print_uuids, SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static byte[]static PayloadUUIDrandomUUID(String payload) static PayloadUUIDrandomUUID(String logical_name, String payload) voidvoidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedvoidsetPayload(String payload) intsize()Returns serialized size of this addresstoString()voidvoidwriteTo(DataOutputStream out) Write the entire state of the current object (including superclasses) to outstream.Methods inherited from class org.jgroups.util.UUID
add, add, clone, compareTo, digits, equals, get, getAdditionalData, getContents, getLeastSignificantBits, getMostSignificantBits, hashCode, isMulticastAddress, printCache, randomUUID, remove, removeAll, retainAll, setAdditionalData, toStringLong
-
Field Details
-
payload
-
-
Constructor Details
-
PayloadUUID
public PayloadUUID() -
PayloadUUID
-
-
Method Details
-
randomUUID
-
randomUUID
-
getPayload
-
setPayload
-
generateRandomBytes
protected static byte[] generateRandomBytes() -
size
public int size()Description copied from interface:AddressReturns serialized size of this address -
writeTo
Description copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeToin interfaceStreamable- Overrides:
writeToin classUUID- Throws:
IOException
-
readFrom
public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException Description copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classUUID- Throws:
IOExceptionIllegalAccessExceptionInstantiationException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classUUID- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classUUID- Throws:
IOException
-
toString
-