public class EndpointNodeImpl extends NodePath implements EndpointNode
| Modifier and Type | Field and Description |
|---|---|
static String |
LIVE |
static String |
TIMETOLIVE |
| Constructor and Description |
|---|
EndpointNodeImpl(ZKBackend backend,
ServiceNodeImpl serviceNode,
String endpointName) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureExists(byte[] content) |
void |
ensureRemoved() |
boolean |
exists() |
byte[] |
getContent() |
String |
getEndpointName() |
Date |
getExpiryTime() |
boolean |
isLive() |
void |
setContent(byte[] content) |
void |
setExpiryTime(Date expiryTime,
boolean persistent) |
void |
setLive(boolean persistent)
Adds a live sub-node to the current endpoint.
|
void |
setOffline() |
public static final String LIVE
public static final String TIMETOLIVE
public EndpointNodeImpl(ZKBackend backend, ServiceNodeImpl serviceNode, String endpointName)
public String getEndpointName()
getEndpointName in interface EndpointNodepublic boolean exists()
throws ServiceLocatorException,
InterruptedException
exists in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic void ensureExists(byte[] content)
throws ServiceLocatorException,
InterruptedException
ensureExists in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic void ensureRemoved()
throws ServiceLocatorException,
InterruptedException
ensureRemoved in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic void setLive(boolean persistent)
throws ServiceLocatorException,
InterruptedException
org.apache.zookeeper.CreateMode.EPHEMERAL
With PERSISTENT : the node won't be destroyed until explicitely executedsetLive in interface EndpointNodepersistent - true (CreateMode.PERSISTENT) or false (CreateMode.EPHEMERAL)ServiceLocatorExceptionInterruptedExceptionpublic void setOffline()
throws ServiceLocatorException,
InterruptedException
setOffline in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic byte[] getContent()
throws ServiceLocatorException,
InterruptedException
getContent in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic void setContent(byte[] content)
throws ServiceLocatorException,
InterruptedException
setContent in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic boolean isLive()
throws ServiceLocatorException,
InterruptedException
isLive in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic Date getExpiryTime() throws ServiceLocatorException, InterruptedException
getExpiryTime in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionpublic void setExpiryTime(Date expiryTime, boolean persistent) throws ServiceLocatorException, InterruptedException
setExpiryTime in interface EndpointNodeServiceLocatorExceptionInterruptedExceptionCopyright © 2011–2019 Talend Inc.. All rights reserved.