Package com.yahoo.document.idstring
Class UserDocIdString
- java.lang.Object
-
- com.yahoo.document.idstring.IdString
-
- com.yahoo.document.idstring.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.document.idstring.IdString
IdString.GidModifier, IdString.Scheme
-
-
Constructor Summary
Constructors Constructor Description UserDocIdString(java.lang.String namespace, long userId, java.lang.String namespaceSpecific)
Create a userdoc scheme object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLocation()
Get the location of this document id.long
getNumber()
java.lang.String
getSchemeSpecific()
Get the scheme specific part.long
getUserId()
boolean
hasNumber()
-
Methods inherited from class com.yahoo.document.idstring.IdString
createFromSerialized, createIdString, equals, generateOrderDocParams, getDocType, getGidModifier, getGroup, getNamespace, getNamespaceSpecific, getSchemeParameters, getType, hasDocType, hasGroup, hashCode, toString, toUtf8
-
-
-
-
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 classIdString
- 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 classIdString
-
getUserId
public long getUserId()
- Returns:
- Get the user id of this id.
-
-