Apache Curator · JSON Structure

Apache Curator Distributed Lock Structure

Configuration and state for an Apache Curator InterProcessMutex distributed lock.

Type: object Properties: 4
ApacheDistributed CoordinationDistributed SystemsJavaMavenOpen SourceService DiscoveryZooKeeper

DistributedLock is a JSON Structure definition published by Apache Curator, describing 4 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

path acquired threadCount lockPath

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

apache-curator-distributed-lock-structure.json Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-curator/refs/heads/main/json-structure/apache-curator-distributed-lock-structure.json",
  "name": "DistributedLock",
  "description": "Configuration and state for an Apache Curator InterProcessMutex distributed lock.",
  "type": "object",
  "properties": {
    "path": {
      "type": "string",
      "description": "ZooKeeper path used as the lock node.",
      "example": "/locks/resource-a"
    },
    "acquired": {
      "type": "boolean",
      "description": "Whether the lock is currently acquired by this process.",
      "example": true
    },
    "threadCount": {
      "type": "int32",
      "description": "Number of times the current thread holds the lock (reentrant count).",
      "minimum": 0,
      "example": 1
    },
    "lockPath": {
      "type": "string",
      "description": "Actual ZooKeeper ephemeral node path created for this lock acquisition.",
      "example": "/locks/resource-a/_c_abc123-lock-0000000001"
    }
  }
}