Package com.yahoo.document.idstring
Class OrderDocIdString
- java.lang.Object
-
- com.yahoo.document.idstring.IdString
-
- com.yahoo.document.idstring.OrderDocIdString
-
public class OrderDocIdString extends IdString
Representation of groupdoc scheme in document IDs.- Author:
- Håkon Humberset
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.document.idstring.IdString
IdString.GidModifier, IdString.Scheme
-
-
Constructor Summary
Constructors Constructor Description OrderDocIdString(java.lang.String namespace, java.lang.String group, int widthBits, int divisionBits, long ordering, java.lang.String namespaceSpecific)
Create a groupdoc scheme object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDivisionBits()
IdString.GidModifier
getGidModifier()
java.lang.String
getGroup()
long
getLocation()
Get the location of this document id.long
getNumber()
long
getOrdering()
java.lang.String
getSchemeParameters()
java.lang.String
getSchemeSpecific()
Get the scheme specific part.long
getUserId()
int
getWidthBits()
boolean
hasGroup()
boolean
hasNumber()
-
Methods inherited from class com.yahoo.document.idstring.IdString
createFromSerialized, createIdString, equals, generateOrderDocParams, getDocType, getNamespace, getNamespaceSpecific, getType, hasDocType, hashCode, toString, toUtf8
-
-
-
-
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 setdivisionBits
- The number of bits used for the smalles partitioning of the data setordering
- 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 classIdString
- Returns:
- The 64 bit location.
-
getSchemeParameters
public java.lang.String getSchemeParameters()
- Overrides:
getSchemeParameters
in classIdString
-
getSchemeSpecific
public java.lang.String getSchemeSpecific()
Get the scheme specific part.- Specified by:
getSchemeSpecific
in classIdString
-
getGidModifier
public IdString.GidModifier getGidModifier()
- Overrides:
getGidModifier
in classIdString
-
getGroup
public java.lang.String getGroup()
-
getUserId
public long getUserId()
-
getWidthBits
public int getWidthBits()
-
getDivisionBits
public int getDivisionBits()
-
getOrdering
public long getOrdering()
-
-