|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 java.lang.String |
CONF_GENERATOR
|
static java.lang.String |
CONF_PREFIX
|
Constructor Summary | |
---|---|
UUIDService()
|
Method Summary | |
---|---|
void |
destroy()
Destroy the UUID service. |
java.lang.String |
generateChildId(java.lang.String id,
java.lang.String childName)
Create a child ID. |
java.lang.String |
generateId(UUIDService.ApplicationType type)
Create a unique ID. |
java.lang.String |
getChildName(java.lang.String childId)
Return the child name from a child ID. |
java.lang.String |
getId(java.lang.String childId)
Return the ID from a child ID. |
java.lang.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 java.lang.String CONF_PREFIX
public static final java.lang.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 java.lang.Class<? extends Service> getInterface()
getInterface
in interface Service
UUIDService
.public java.lang.String generateId(UUIDService.ApplicationType type)
type:
- Type of Id. Generally 'C' for Coordinator and 'W' for Workflow.
public java.lang.String generateChildId(java.lang.String id, java.lang.String childName)
id
- unique ID.childName
- child name.
public java.lang.String getId(java.lang.String childId)
childId
- child ID.
public java.lang.String getChildName(java.lang.String childId)
childId
- child ID.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |