From 36bf5ee9feb71772508131d53005098aae322348 Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 9 Nov 2010 15:41:47 +0200 Subject: [PATCH] add toString to cluster block --- .../org/elasticsearch/cluster/block/ClusterBlock.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java index f43892a7805..187aeea400b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java @@ -104,6 +104,15 @@ public class ClusterBlock implements Serializable, Streamable, ToXContent { } } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(id).append(",").append(description).append(", blocks "); + for (ClusterBlockLevel level : levels) { + sb.append(level.name()).append(","); + } + return sb.toString(); + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false;