public class ZKUUIDService extends UUIDService
ZKUtils). The
sequence will be reset to 0, once max is reached.UUIDService.ApplicationType| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONF_PREFIX |
static java.lang.String |
CONF_SEQUENCE_MAX |
static java.lang.ThreadLocal<java.text.SimpleDateFormat> |
dt |
static java.lang.String |
LOCKS_NODE |
static long |
RESET_VALUE |
static int |
RETRY_COUNT |
static java.lang.String |
ZK_SEQUENCE_PATH |
CONF_GENERATOR, MAX_ACTION_ID_LEN, MAX_OOZIE_JOB_ID_LEN, startTimeDEFAULT_LOCK_TIMEOUT, lockTimeout| Constructor and Description |
|---|
ZKUUIDService() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
createSequence()
Gets the unique id.
|
void |
destroy()
Destroy the UUID service.
|
java.lang.String |
getPromotedLock() |
protected long |
getZKSequence() |
void |
init(Services services)
Initialize the UUID service.
|
appendTimeToSequence, generateChildId, generateId, getChildName, getCounter, getId, getInterface, longPadding, resetStartTimepublic static final java.lang.String CONF_PREFIX
public static final java.lang.String CONF_SEQUENCE_MAX
public static final java.lang.String LOCKS_NODE
public static final java.lang.String ZK_SEQUENCE_PATH
public static final long RESET_VALUE
public static final int RETRY_COUNT
public static final java.lang.ThreadLocal<java.text.SimpleDateFormat> dt
public ZKUUIDService()
public void init(Services services) throws ServiceException
UUIDServiceinit in interface Serviceinit in class UUIDServiceservices - services instance.ServiceException - thrown if the UUID service could not be initialized.protected java.lang.String createSequence()
createSequence in class UUIDServicejava.lang.Exception - the exceptionprotected long getZKSequence() throws java.lang.Exception
java.lang.Exceptionpublic void destroy()
UUIDServicedestroy in interface Servicedestroy in class UUIDServicepublic java.lang.String getPromotedLock()
Copyright © 2019 Apache Software Foundation. All Rights Reserved.