add cluster selection strategies to /database REST endpoint result
@@ -29,7 +29,6 @@ import com.orientechnologies.orient.core.exception.OSecurityAccessException;
import com.orientechnologies.orient.core.index.OIndex;
import com.orientechnologies.orient.core.index.OIndexDefinition;
import com.orientechnologies.orient.core.index.OIndexManager;
-import com.orientechnologies.orient.core.index.OIndexManagerProxy;
import com.orientechnologies.orient.core.metadata.OMetadataInternal;
import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OClassImpl;
@@ -191,6 +190,15 @@ public class OServerCommandGetDatabase extends OServerCommandGetConnect {
}
json.endCollection();
+ json.beginCollection("clusterSelectionStrategies");
+ Set<String> clusterSelectionStrategies = db.getMetadata().getSchema().getClusterSelectionFactory().getRegisteredNames();
+ int j = 0;
+ for (String strategy : clusterSelectionStrategies) {
+ json.write((j > 0 ? "," : "") + "\"" + strategy + "\"");
+ j++;
+ }
+ json.endCollection();
+
json.endObject();
if (((OMetadataInternal) db.getMetadata()).getImmutableSchemaSnapshot().getClasses() != null) {
