Class UserDocIdString


  • public class UserDocIdString
    extends IdString
    Representation of userdoc scheme in document IDs. A user id is any 64 bit number. Note that internally, these are handled as unsigned values.
    Author:
    Einar M R Rosenvinge
    • Constructor Detail

      • UserDocIdString

        public UserDocIdString​(java.lang.String namespace,
                               long userId,
                               java.lang.String namespaceSpecific)
        Create a userdoc scheme object. userdoc:<namespace>:<userid>:<namespaceSpecific>
        Parameters:
        namespace - The namespace of this document id.
        userId - 64 bit user id of this userdoc id.
        namespaceSpecific - The namespace specific part.
    • Method Detail

      • getLocation

        public long getLocation()
        Get the location of this document id. The location is used for distribution in clusters. For the userdoc scheme, the location equals the user id.
        Specified by:
        getLocation in class IdString
        Returns:
        The 64 bit location.
      • getSchemeSpecific

        public java.lang.String getSchemeSpecific()
        Get the scheme specific part. Which for a userdoc, is the userid and a colon.
        Specified by:
        getSchemeSpecific in class IdString
      • getUserId

        public long getUserId()
        Returns:
        Get the user id of this id.