net.rim.device.api.synchronization
Class UIDGenerator
java.lang.Object
net.rim.device.api.synchronization.UIDGenerator
public class UIDGenerator
- extends Object
A utility class to generate 32-bit unique IDs that can be used for synchronization or any other purpose.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
|
Method Summary |
|
static int |
getUID()
Gets a unique ID. |
|
static int |
getUID(int scope)
Gets a unique ID for a given scope. |
|
static int |
getUniqueScopingValue()
Generates a unique scoping value. |
|
static long |
makeLUID(int scope,
int value)
Generates a long form of the scope and value. |
getUniqueScopingValue
public static int getUniqueScopingValue()
- Generates a unique scoping value.
- Returns:
- A unique scoping value.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getUID
public static int getUID()
- Gets a unique ID.
- Returns:
- A unique ID.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
getUID
public static int getUID(int scope)
- Gets a unique ID for a given scope.
- Parameters:
scope - A unique scoping value.
- Returns:
- A unique ID.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
makeLUID
public static long makeLUID(int scope,
int value)
- Generates a long form of the scope and value.
This simply places the scope in the upper 32-bits and the value in the lower 32-bits.
- Parameters:
scope - The scoping value.value - The UID for the scope.
- Returns:
- A long value combining the two Ids.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal