Class BasicUUID
java.lang.Object
org.apache.derby.impl.services.uuid.BasicUUID
- All Implemented Interfaces:
Externalizable, Serializable, UUID, Formatable, TypedFormat
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate intprivate longFields inherited from interface UUID
NULL, UUID_BYTE_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneMe()Clone this UUID.booleanImplement value equality.intReturn my format identifier.inthashCode()Provide a hashCode which is compatible with the equals() method.voidRead this inprivate static longreadMSB(StringReader sr) Read a long value, msb first, from its character representation in the string reader, using '-' or end of string to delimit.stringWorkhorse(char separator) Private workhorse of the string making routines.Produce a string representation of this UUID which is suitable for use as a unique ANSI identifier.toString()Produce a string representation of this UUID which can be passed to UUIDFactory.recreateUUID later on to reconstruct it.voidWrite this out.private static voidwriteMSB(char[] data, int offset, long value, int nbytes)
-
Field Details
-
majorId
private long majorId -
timemillis
private long timemillis -
sequence
private int sequence
-
-
Constructor Details
-
BasicUUID
public BasicUUID(long majorId, long timemillis, int sequence) Constructor only called by BasicUUIDFactory. -
BasicUUID
Constructor only called by BasicUUIDFactory. Constructs a UUID from the string representation produced by toString.- See Also:
-
BasicUUID
public BasicUUID()
-
-
Method Details
-
writeExternal
Write this out.- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException- error writing to log stream
-
readExternal
Read this in- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException- error reading from log stream
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Specified by:
getTypeFormatIdin interfaceTypedFormat- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
writeMSB
private static void writeMSB(char[] data, int offset, long value, int nbytes) -
readMSB
Read a long value, msb first, from its character representation in the string reader, using '-' or end of string to delimit. -
equals
-
hashCode
-
toString
-
toANSIidentifier
Produce a string representation of this UUID which is suitable for use as a unique ANSI identifier.- Specified by:
toANSIidentifierin interfaceUUID
-
stringWorkhorse
Private workhorse of the string making routines.- Parameters:
separator- Character to separate number blocks. Null means do not include a separator.- Returns:
- string representation of UUID.
-
cloneMe
-