Class OrderDocIdString


  • public class OrderDocIdString
    extends IdString
    Representation of groupdoc scheme in document IDs.
    Author:
    Håkon Humberset
    • Constructor Detail

      • OrderDocIdString

        public OrderDocIdString​(java.lang.String namespace,
                                java.lang.String group,
                                int widthBits,
                                int divisionBits,
                                long ordering,
                                java.lang.String namespaceSpecific)
        Create a groupdoc scheme object. groupdoc:<namespace>:<group>:<namespaceSpecific>
        Parameters:
        namespace - The namespace of this document id.
        group - The groupname of this groupdoc id.
        widthBits - The number of bits used for the width of the data set
        divisionBits - The number of bits used for the smalles partitioning of the data set
        ordering - A value used to order documents of this type.
        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 orderdoc scheme, the location is a hash of the groupname or just the number specified.
        Specified by:
        getLocation in class IdString
        Returns:
        The 64 bit location.
      • getSchemeSpecific

        public java.lang.String getSchemeSpecific()
        Get the scheme specific part.
        Specified by:
        getSchemeSpecific in class IdString
      • getGroup

        public java.lang.String getGroup()
        Overrides:
        getGroup in class IdString
        Returns:
        Get the groupname of this id.
      • getUserId

        public long getUserId()
      • getWidthBits

        public int getWidthBits()
      • getDivisionBits

        public int getDivisionBits()
      • getOrdering

        public long getOrdering()