Return-Path: X-Original-To: apmail-zookeeper-commits-archive@www.apache.org Delivered-To: apmail-zookeeper-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8EC441836B for ; Thu, 3 Dec 2015 04:31:10 +0000 (UTC) Received: (qmail 15263 invoked by uid 500); 3 Dec 2015 04:31:05 -0000 Delivered-To: apmail-zookeeper-commits-archive@zookeeper.apache.org Received: (qmail 15229 invoked by uid 500); 3 Dec 2015 04:31:05 -0000 Mailing-List: contact commits-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ Delivered-To: mailing list commits@zookeeper.apache.org Received: (qmail 15218 invoked by uid 99); 3 Dec 2015 04:31:05 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 04:31:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BEB9DC72BF for ; Thu, 3 Dec 2015 04:31:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.991 X-Spam-Level: X-Spam-Status: No, score=0.991 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jSfve9dIQsne for ; Thu, 3 Dec 2015 04:30:50 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id 5ECA435C33 for ; Thu, 3 Dec 2015 04:30:50 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 19878E104B for ; Thu, 3 Dec 2015 04:30:49 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 072303A0288 for ; Thu, 3 Dec 2015 04:30:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r974351 [15/42] - in /websites/staging/zookeeper/trunk/content: ./ doc/r3.4.7/ doc/r3.4.7/api/ doc/r3.4.7/api/org/ doc/r3.4.7/api/org/apache/ doc/r3.4.7/api/org/apache/zookeeper/ doc/r3.4.7/api/org/apache/zookeeper/class-use/ doc/r3.4.7/api... Date: Thu, 03 Dec 2015 04:30:47 -0000 To: commits@zookeeper.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151203043049.072303A0288@svn01-us-west.apache.org> Added: websites/staging/zookeeper/trunk/content/doc/r3.4.7/api/org/apache/zookeeper/ZooKeeper.html ============================================================================== --- websites/staging/zookeeper/trunk/content/doc/r3.4.7/api/org/apache/zookeeper/ZooKeeper.html (added) +++ websites/staging/zookeeper/trunk/content/doc/r3.4.7/api/org/apache/zookeeper/ZooKeeper.html Thu Dec 3 04:30:43 2015 @@ -0,0 +1,1886 @@ + + + + + +ZooKeeper (ZooKeeper 3.4.7 API) + + + + + + + + + + + + +
+
org.apache.zookeeper
+

Class ZooKeeper

+
+
+ +
+
    +
  • +
    +
    +
    public class ZooKeeper
    +extends Object
    +
    This is the main class of ZooKeeper client library. To use a ZooKeeper + service, an application must first instantiate an object of ZooKeeper class. + All the iterations will be done by calling the methods of ZooKeeper class. + The methods of this class are thread-safe unless otherwise noted. +

    + Once a connection to a server is established, a session ID is assigned to the + client. The client will send heart beats to the server periodically to keep + the session valid. +

    + The application can call ZooKeeper APIs through a client as long as the + session ID of the client remains valid. +

    + If for some reason, the client fails to send heart beats to the server for a + prolonged period of time (exceeding the sessionTimeout value, for instance), + the server will expire the session, and the session ID will become invalid. + The client object will no longer be usable. To make ZooKeeper API calls, the + application must create a new client object. +

    + If the ZooKeeper server the client currently connects to fails or otherwise + does not respond, the client will automatically try to connect to another + server before its session ID expires. If successful, the application can + continue to use the client. +

    + The ZooKeeper API methods are either synchronous or asynchronous. Synchronous + methods blocks until the server has responded. Asynchronous methods just queue + the request for sending and return immediately. They take a callback object that + will be executed either on successful execution of the request or on error with + an appropriate return code (rc) indicating the error. +

    + Some successful ZooKeeper API calls can leave watches on the "data nodes" in + the ZooKeeper server. Other successful ZooKeeper API calls can trigger those + watches. Once a watch is triggered, an event will be delivered to the client + which left the watch at the first place. Each watch can be triggered only + once. Thus, up to one event will be delivered to a client for every watch it + leaves. +

    + A client needs an object of a class implementing Watcher interface for + processing the events delivered to the client. + + When a client drops current connection and re-connects to a server, all the + existing watches are considered as being triggered but the undelivered events + are lost. To emulate this, the client will generate a special event to tell + the event handler a connection has been dropped. This special event has type + EventNone and state sKeeperStateDisconnected.

    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ZooKeeper

        +
        public ZooKeeper(String connectString,
        +                 int sessionTimeout,
        +                 Watcher watcher)
        +          throws IOException
        +
        To create a ZooKeeper client object, the application needs to pass a + connection string containing a comma separated list of host:port pairs, + each corresponding to a ZooKeeper server. +

        + Session establishment is asynchronous. This constructor will initiate + connection to the server and return immediately - potentially (usually) + before the session is fully established. The watcher argument specifies + the watcher that will be notified of any changes in state. This + notification can come at any point before or after the constructor call + has returned. +

        + The instantiated ZooKeeper client object will pick an arbitrary server + from the connectString and attempt to connect to it. If establishment of + the connection fails, another server in the connect string will be tried + (the order is non-deterministic, as we random shuffle the list), until a + connection is established. The client will continue attempts until the + session is explicitly closed. +

        + Added in 3.2.0: An optional "chroot" suffix may also be appended to the + connection string. This will run the client commands while interpreting + all paths relative to this root (similar to the unix chroot command).

        +
        +
        Parameters:
        +
        connectString - comma separated host:port pairs, each corresponding to a zk + server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" If + the optional chroot suffix is used the example would look + like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" + where the client would be rooted at "/app/a" and all paths + would be relative to this root - ie getting/setting/etc... + "/foo/bar" would result in operations being run on + "/app/a/foo/bar" (from the server perspective).
        +
        sessionTimeout - session timeout in milliseconds
        +
        watcher - a watcher object which will be notified of state changes, may + also be notified for node events
        +
        Throws:
        +
        IOException - in cases of network failure
        +
        IllegalArgumentException - if an invalid chroot path is specified
        +
        +
      • +
      + + + +
        +
      • +

        ZooKeeper

        +
        public ZooKeeper(String connectString,
        +                 int sessionTimeout,
        +                 Watcher watcher,
        +                 boolean canBeReadOnly)
        +          throws IOException
        +
        To create a ZooKeeper client object, the application needs to pass a + connection string containing a comma separated list of host:port pairs, + each corresponding to a ZooKeeper server. +

        + Session establishment is asynchronous. This constructor will initiate + connection to the server and return immediately - potentially (usually) + before the session is fully established. The watcher argument specifies + the watcher that will be notified of any changes in state. This + notification can come at any point before or after the constructor call + has returned. +

        + The instantiated ZooKeeper client object will pick an arbitrary server + from the connectString and attempt to connect to it. If establishment of + the connection fails, another server in the connect string will be tried + (the order is non-deterministic, as we random shuffle the list), until a + connection is established. The client will continue attempts until the + session is explicitly closed. +

        + Added in 3.2.0: An optional "chroot" suffix may also be appended to the + connection string. This will run the client commands while interpreting + all paths relative to this root (similar to the unix chroot command).

        +
        +
        Parameters:
        +
        connectString - comma separated host:port pairs, each corresponding to a zk + server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" If + the optional chroot suffix is used the example would look + like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" + where the client would be rooted at "/app/a" and all paths + would be relative to this root - ie getting/setting/etc... + "/foo/bar" would result in operations being run on + "/app/a/foo/bar" (from the server perspective).
        +
        sessionTimeout - session timeout in milliseconds
        +
        watcher - a watcher object which will be notified of state changes, may + also be notified for node events
        +
        canBeReadOnly - (added in 3.4) whether the created client is allowed to go to + read-only mode in case of partitioning. Read-only mode + basically means that if the client can't find any majority + servers but there's partitioned server it could reach, it + connects to one in read-only mode, i.e. read requests are + allowed while write requests are not. It continues seeking for + majority in the background.
        +
        Throws:
        +
        IOException - in cases of network failure
        +
        IllegalArgumentException - if an invalid chroot path is specified
        +
        +
      • +
      + + + +
        +
      • +

        ZooKeeper

        +
        public ZooKeeper(String connectString,
        +                 int sessionTimeout,
        +                 Watcher watcher,
        +                 long sessionId,
        +                 byte[] sessionPasswd)
        +          throws IOException
        +
        To create a ZooKeeper client object, the application needs to pass a + connection string containing a comma separated list of host:port pairs, + each corresponding to a ZooKeeper server. +

        + Session establishment is asynchronous. This constructor will initiate + connection to the server and return immediately - potentially (usually) + before the session is fully established. The watcher argument specifies + the watcher that will be notified of any changes in state. This + notification can come at any point before or after the constructor call + has returned. +

        + The instantiated ZooKeeper client object will pick an arbitrary server + from the connectString and attempt to connect to it. If establishment of + the connection fails, another server in the connect string will be tried + (the order is non-deterministic, as we random shuffle the list), until a + connection is established. The client will continue attempts until the + session is explicitly closed (or the session is expired by the server). +

        + Added in 3.2.0: An optional "chroot" suffix may also be appended to the + connection string. This will run the client commands while interpreting + all paths relative to this root (similar to the unix chroot command). +

        + Use getSessionId() and getSessionPasswd() on an established + client connection, these values must be passed as sessionId and + sessionPasswd respectively if reconnecting. Otherwise, if not + reconnecting, use the other constructor which does not require these + parameters.

        +
        +
        Parameters:
        +
        connectString - comma separated host:port pairs, each corresponding to a zk + server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" + If the optional chroot suffix is used the example would look + like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" + where the client would be rooted at "/app/a" and all paths + would be relative to this root - ie getting/setting/etc... + "/foo/bar" would result in operations being run on + "/app/a/foo/bar" (from the server perspective).
        +
        sessionTimeout - session timeout in milliseconds
        +
        watcher - a watcher object which will be notified of state changes, may + also be notified for node events
        +
        sessionId - specific session id to use if reconnecting
        +
        sessionPasswd - password for this session
        +
        Throws:
        +
        IOException - in cases of network failure
        +
        IllegalArgumentException - if an invalid chroot path is specified
        +
        IllegalArgumentException - for an invalid list of ZooKeeper hosts
        +
        +
      • +
      + + + +
        +
      • +

        ZooKeeper

        +
        public ZooKeeper(String connectString,
        +                 int sessionTimeout,
        +                 Watcher watcher,
        +                 long sessionId,
        +                 byte[] sessionPasswd,
        +                 boolean canBeReadOnly)
        +          throws IOException
        +
        To create a ZooKeeper client object, the application needs to pass a + connection string containing a comma separated list of host:port pairs, + each corresponding to a ZooKeeper server. +

        + Session establishment is asynchronous. This constructor will initiate + connection to the server and return immediately - potentially (usually) + before the session is fully established. The watcher argument specifies + the watcher that will be notified of any changes in state. This + notification can come at any point before or after the constructor call + has returned. +

        + The instantiated ZooKeeper client object will pick an arbitrary server + from the connectString and attempt to connect to it. If establishment of + the connection fails, another server in the connect string will be tried + (the order is non-deterministic, as we random shuffle the list), until a + connection is established. The client will continue attempts until the + session is explicitly closed (or the session is expired by the server). +

        + Added in 3.2.0: An optional "chroot" suffix may also be appended to the + connection string. This will run the client commands while interpreting + all paths relative to this root (similar to the unix chroot command). +

        + Use getSessionId() and getSessionPasswd() on an established + client connection, these values must be passed as sessionId and + sessionPasswd respectively if reconnecting. Otherwise, if not + reconnecting, use the other constructor which does not require these + parameters.

        +
        +
        Parameters:
        +
        connectString - comma separated host:port pairs, each corresponding to a zk + server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" + If the optional chroot suffix is used the example would look + like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" + where the client would be rooted at "/app/a" and all paths + would be relative to this root - ie getting/setting/etc... + "/foo/bar" would result in operations being run on + "/app/a/foo/bar" (from the server perspective).
        +
        sessionTimeout - session timeout in milliseconds
        +
        watcher - a watcher object which will be notified of state changes, may + also be notified for node events
        +
        sessionId - specific session id to use if reconnecting
        +
        sessionPasswd - password for this session
        +
        canBeReadOnly - (added in 3.4) whether the created client is allowed to go to + read-only mode in case of partitioning. Read-only mode + basically means that if the client can't find any majority + servers but there's partitioned server it could reach, it + connects to one in read-only mode, i.e. read requests are + allowed while write requests are not. It continues seeking for + majority in the background.
        +
        Throws:
        +
        IOException - in cases of network failure
        +
        IllegalArgumentException - if an invalid chroot path is specified
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSaslClient

        +
        public org.apache.zookeeper.client.ZooKeeperSaslClient getSaslClient()
        +
      • +
      + + + +
        +
      • +

        getSessionId

        +
        public long getSessionId()
        +
        The session id for this ZooKeeper client instance. The value returned is + not valid until the client connects to a server and may change after a + re-connect. + + This method is NOT thread safe
        +
        +
        Returns:
        +
        current session id
        +
        +
      • +
      + + + +
        +
      • +

        getSessionPasswd

        +
        public byte[] getSessionPasswd()
        +
        The session password for this ZooKeeper client instance. The value + returned is not valid until the client connects to a server and may + change after a re-connect. + + This method is NOT thread safe
        +
        +
        Returns:
        +
        current session password
        +
        +
      • +
      + + + +
        +
      • +

        getSessionTimeout

        +
        public int getSessionTimeout()
        +
        The negotiated session timeout for this ZooKeeper client instance. The + value returned is not valid until the client connects to a server and + may change after a re-connect. + + This method is NOT thread safe
        +
        +
        Returns:
        +
        current session timeout
        +
        +
      • +
      + + + +
        +
      • +

        addAuthInfo

        +
        public void addAuthInfo(String scheme,
        +                        byte[] auth)
        +
        Add the specified scheme:auth information to this connection. + + This method is NOT thread safe
        +
        +
        Parameters:
        +
        scheme -
        +
        auth -
        +
        +
      • +
      + + + +
        +
      • +

        register

        +
        public void register(Watcher watcher)
        +
        Specify the default watcher for the connection (overrides the one + specified during construction).
        +
        +
        Parameters:
        +
        watcher -
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws InterruptedException
        +
        Close this client object. Once the client is closed, its session becomes + invalid. All the ephemeral nodes in the ZooKeeper server associated with + the session will be removed. The watches left on those nodes (and on + their parents) will be triggered.
        +
        +
        Throws:
        +
        InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        create

        +
        public String create(String path,
        +                     byte[] data,
        +                     List<ACL> acl,
        +                     CreateMode createMode)
        +              throws KeeperException,
        +                     InterruptedException
        +
        Create a node with the given path. The node data will be the given data, + and node acl will be the given acl. +

        + The flags argument specifies whether the created node will be ephemeral + or not. +

        + An ephemeral node will be removed by the ZooKeeper automatically when the + session associated with the creation of the node expires. +

        + The flags argument can also specify to create a sequential node. The + actual path name of a sequential node will be the given path plus a + suffix "i" where i is the current sequential number of the node. The sequence + number is always fixed length of 10 digits, 0 padded. Once + such a node is created, the sequential number will be incremented by one. +

        + If a node with the same actual path already exists in the ZooKeeper, a + KeeperException with error code KeeperException.NodeExists will be + thrown. Note that since a different actual path is used for each + invocation of creating sequential node with the same path argument, the + call will never throw "file exists" KeeperException. +

        + If the parent node does not exist in the ZooKeeper, a KeeperException + with error code KeeperException.NoNode will be thrown. +

        + An ephemeral node cannot have children. If the parent node of the given + path is ephemeral, a KeeperException with error code + KeeperException.NoChildrenForEphemerals will be thrown. +

        + This operation, if successful, will trigger all the watches left on the + node of the given path by exists and getData API calls, and the watches + left on the parent node by getChildren API calls. +

        + If a node is created successfully, the ZooKeeper server will trigger the + watches on the path left by exists calls, and the watches on the parent + of the node by getChildren calls. +

        + The maximum allowable size of the data array is 1 MB (1,048,576 bytes). + Arrays larger than this will cause a KeeperExecption to be thrown.

        +
        +
        Parameters:
        +
        path - the path for the node
        +
        data - the initial data for the node
        +
        acl - the acl for the node
        +
        createMode - specifying whether the node to be created is ephemeral + and/or sequential
        +
        Returns:
        +
        the actual path of the created node
        +
        Throws:
        +
        KeeperException - if the server returns a non-zero error code
        +
        KeeperException.InvalidACLException - if the ACL is invalid, null, or empty
        +
        InterruptedException - if the transaction is interrupted
        +
        IllegalArgumentException - if an invalid path is specified
        +
        +
      • +
      + + + + + + + +
        +
      • +

        delete

        +
        public void delete(String path,
        +                   int version)
        +            throws InterruptedException,
        +                   KeeperException
        +
        Delete the node with the given path. The call will succeed if such a node + exists, and the given version matches the node's version (if the given + version is -1, it matches any node's versions). +

        + A KeeperException with error code KeeperException.NoNode will be thrown + if the nodes does not exist. +

        + A KeeperException with error code KeeperException.BadVersion will be + thrown if the given version does not match the node's version. +

        + A KeeperException with error code KeeperException.NotEmpty will be thrown + if the node has children. +

        + This operation, if successful, will trigger all the watches on the node + of the given path left by exists API calls, and the watches on the parent + node left by getChildren API calls.

        +
        +
        Parameters:
        +
        path - the path of the node to be deleted.
        +
        version - the expected node version.
        +
        Throws:
        +
        InterruptedException - IF the server transaction is interrupted
        +
        KeeperException - If the server signals an error with a non-zero + return code.
        +
        IllegalArgumentException - if an invalid path is specified
        +
        +
      • +
      + + + +
        +
      • +

        multi

        +
        public List<org.apache.zookeeper.OpResult> multi(Iterable<org.apache.zookeeper.Op> ops)
        +                                          throws InterruptedException,
        +                                                 KeeperException
        +
        Executes multiple ZooKeeper operations or none of them. +

        + On success, a list of results is returned. + On failure, an exception is raised which contains partial results and + error details, see KeeperException.getResults() +

        + Note: The maximum allowable size of all of the data arrays in all of + the setData operations in this single request is typically 1 MB + (1,048,576 bytes). This limit is specified on the server via + jute.maxbuffer. + Requests larger than this will cause a KeeperException to be + thrown.

        +
        +
        Parameters:
        +
        ops - An iterable that contains the operations to be done. + These should be created using the factory methods on Op.
        +
        Returns:
        +
        A list of results, one for each input Op, the order of + which exactly matches the order of the ops input + operations.
        +
        Throws:
        +
        InterruptedException - If the operation was interrupted. + The operation may or may not have succeeded, but will not have + partially succeeded if this exception is thrown.
        +
        KeeperException - If the operation could not be completed + due to some error in doing one of the specified ops.
        +
        IllegalArgumentException - if an invalid path is specified
        +
        Since:
        +
        3.4.0
        +
        +
      • +
      + + + + + + + +
        +
      • +

        transaction

        +
        public org.apache.zookeeper.Transaction transaction()
        +
        A Transaction is a thin wrapper on the multi(java.lang.Iterable<org.apache.zookeeper.Op>) method + which provides a builder object that can be used to construct + and commit an atomic set of operations.
        +
        +
        Returns:
        +
        a Transaction builder object
        +
        Since:
        +
        3.4.0
        +
        +
      • +
      + + + + + + + +
        +
      • +

        exists

        +
        public Stat exists(String path,
        +                   Watcher watcher)
        +            throws KeeperException,
        +                   InterruptedException
        +
        Return the stat of the node of the given path. Return null if no such a + node exists. +

        + If the watch is non-null and the call is successful (no exception is thrown), + a watch will be left on the node with the given path. The watch will be + triggered by a successful operation that creates/delete the node or sets + the data on the node.

        +
        +
        Parameters:
        +
        path - the node path
        +
        watcher - explicit watcher
        +
        Returns:
        +
        the stat of the node of the given path; return null if no such a + node exists.
        +
        Throws:
        +
        KeeperException - If the server signals an error
        +
        InterruptedException - If the server transaction is interrupted.
        +
        IllegalArgumentException - if an invalid path is specified
        +
        +
      • +
      + + + +
        +
      • +

        exists

        +
        public Stat exists(String path,
        +                   boolean watch)
        +            throws KeeperException,
        +                   InterruptedException
        +
        Return the stat of the node of the given path. Return null if no such a + node exists. +

        + If the watch is true and the call is successful (no exception is thrown), + a watch will be left on the node with the given path. The watch will be + triggered by a successful operation that creates/delete the node or sets + the data on the node.

        +
        +
        Parameters:
        +
        path - the node path
        +
        watch - whether need to watch this node
        +
        Returns:
        +
        the stat of the node of the given path; return null if no such a + node exists.
        +
        Throws:
        +
        KeeperException - If the server signals an error
        +
        InterruptedException - If the server transaction is interrupted.
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getData

        +
        public byte[] getData(String path,
        +                      Watcher watcher,
        +                      Stat stat)
        +               throws KeeperException,
        +                      InterruptedException
        +
        Return the data and the stat of the node of the given path. +

        + If the watch is non-null and the call is successful (no exception is + thrown), a watch will be left on the node with the given path. The watch + will be triggered by a successful operation that sets data on the node, or + deletes the node. +

        + A KeeperException with error code KeeperException.NoNode will be thrown + if no node with the given path exists.

        +
        +
        Parameters:
        +
        path - the given path
        +
        watcher - explicit watcher
        +
        stat - the stat of the node
        +
        Returns:
        +
        the data of the node
        +
        Throws:
        [... 570 lines stripped ...]