|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.service.UUIDService
public class UUIDService
The UUID service generates unique IDs.
The configuration propertyCONF_GENERATOR
specifies the ID generation type, 'random' or 'counter'.
For 'random' uses the JDK UUID.randomUUID() method.
For 'counter' uses a counter postfixed wit the system start up time.
Nested Class Summary | |
---|---|
static class |
UUIDService.ApplicationType
|
Field Summary | |
---|---|
static String |
CONF_GENERATOR
|
static String |
CONF_PREFIX
|
Fields inherited from interface org.apache.oozie.service.Service |
---|
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND |
Constructor Summary | |
---|---|
UUIDService()
|
Method Summary | |
---|---|
void |
destroy()
Destroy the UUID service. |
String |
generateChildId(String id,
String childName)
Create a child ID. |
String |
generateId(UUIDService.ApplicationType type)
Create a unique ID. |
String |
getChildName(String childId)
Return the child name from a child ID. |
String |
getId(String childId)
Return the ID from a child ID. |
Class<? extends Service> |
getInterface()
Return the public interface for UUID service. |
void |
init(Services services)
Initialize the UUID service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONF_PREFIX
public static final String CONF_GENERATOR
Constructor Detail |
---|
public UUIDService()
Method Detail |
---|
public void init(Services services) throws ServiceException
init
in interface Service
services
- services instance.
ServiceException
- thrown if the UUID service could not be initialized.public void destroy()
destroy
in interface Service
public Class<? extends Service> getInterface()
getInterface
in interface Service
UUIDService
.public String generateId(UUIDService.ApplicationType type)
type:
- Type of Id. Generally 'C' for Coordinator and 'W' for Workflow.
public String generateChildId(String id, String childName)
id
- unique ID.childName
- child name.
public String getId(String childId)
childId
- child ID.
public String getChildName(String childId)
childId
- child ID.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |