byte[] data = ServiceEndPointJsonCodec.toJson(endPoint, registrationData).getBytes(Charsets.UTF_8);
checkState(data.length < MAX_DATA_SIZE, "Serialized form of ServiceEndPoint must be < 1MB.");
String path = makeEndPointPath(endPoint);
PersistentEphemeralNode oldNode = _nodes.put(path, _nodeFactory.create(path, data));
if (oldNode != null) {
closeNode(oldNode);
}
String serviceName = endPoint.getServiceName();