Vostok.ZooKeeper
  • Overview
  • Quickstart
  • Basics
    • Creating a Client
    • Connecting to a ZooKeeper Cluster
    • Using Client
    • Limitations
  • Operations
    • Common Concepts
    • Creating a Node
    • Deleting a Node
    • Probing Node Existence
    • Getting Children of a Node
    • Getting of a Node Data
    • Setting of a Node Data
  • Observing Node Events
  • Recipes
    • Distributed Lock
Powered by GitBook
On this page
  1. Operations

Getting of a Node Data

To get a binary data associated with node, use GetDataAsync:

var getDataResult = await client.GetDataAsync(new GetDataRequest("/path/to/node"));
byte[]? data = getDataResult.Data;
NodeStat? stat = getDataResult.Stat;

If such node exists and has any data, it will be accessible through Data property of the result. Like ExistsResult, GetDataResult also contains NodeStat Stat object, which is not-null when node exists.

PreviousGetting Children of a NodeNextSetting of a Node Data

Last updated 3 years ago