Examples of beginCollection()


Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

      StringWriter jsonBuffer = new StringWriter();
      OJSONWriter json = new OJSONWriter(jsonBuffer);

      json.beginObject();

      json.beginCollection(1, true, "connections");

      String lastCommandOn;
      String connectedOn;

      final OClientConnection[] conns = OServerMain.server().getManagedServer().getConnections();
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        writeField(json, 2, "connectedOn", connectedOn);
        json.endObject(2);
      }
      json.endCollection(1, false);

      json.beginCollection(1, true, "dbs");
      Map<String, OResourcePool<String, ODatabaseDocumentTx>> dbPool = OSharedDocumentDatabase.getDatabasePools();
      for (Entry<String, OResourcePool<String, ODatabaseDocumentTx>> entry : dbPool.entrySet()) {
        for (ODatabaseDocumentTx db : entry.getValue().getResources()) {

          json.beginObject(2);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

          json.endObject(2);
        }
      }
      json.endCollection(1, false);

      json.beginCollection(1, true, "storages");
      OStorage[] storages = OServerMain.server().getManagedServer().getOpenedStorages();
      for (OStorage s : storages) {
        json.beginObject(2);
        writeField(json, 2, "name", s.getName());
        writeField(json, 2, "type", s.getClass().getSimpleName());
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        writeField(json, 2, "activeUsers", s.getUsers());
        json.endObject(2);
      }
      json.endCollection(1, false);

      json.beginCollection(2, true, "properties");
      for (OServerEntryConfiguration entry : OServerMain.server().getConfiguration().properties) {
        json.beginObject(3, true, null);
        json.writeAttribute(4, false, "name", entry.name);
        json.writeAttribute(4, false, "value", entry.value);
        json.endObject(3, true);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        json.endObject(3, true);
      }
      json.endCollection(2, true);

      json.beginObject(1, true, "profiler");
      json.beginCollection(2, true, "hookValues");
      for (String h : OProfiler.getInstance().getHooks()) {
        json.beginObject(3);
        writeField(json, 3, "name", h);
        writeField(json, 3, "value", OProfiler.getInstance().getHookValue(h));
        json.endObject(3);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        writeField(json, 3, "value", OProfiler.getInstance().getHookValue(h));
        json.endObject(3);
      }
      json.endCollection(2, false);
     
      json.beginCollection(2, true, "counters");
      for (String c : OProfiler.getInstance().getCounters()) {
        json.beginObject(3);
        writeField(json, 3, "name", c);
        writeField(json, 3, "value", OProfiler.getInstance().getCounter(c));
        json.endObject(3);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

      }
      json.endCollection(2, false);

      OProfilerEntry pEntry;

      json.beginCollection(2, true, "stats");
      for (String s : OProfiler.getInstance().getStats()) {
        pEntry = OProfiler.getInstance().getStat(s);

        json.beginObject(3);
        writeField(json, 3, "name", s);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

        writeField(json, 3, "totalElapsed", pEntry.total);
        json.endObject(3);
      }
      json.endCollection(2, false);

      json.beginCollection(2, true, "chronos");
      for (String c : OProfiler.getInstance().getChronos()) {
        pEntry = OProfiler.getInstance().getChrono(c);

        json.beginObject(3);
        writeField(json, 3, "name", c);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

    }

    final String format = iFetchPlan != null ? JSON_FORMAT + ",fetchPlan:" + iFetchPlan : JSON_FORMAT;

    // WRITE RECORDS
    json.beginCollection(1, true, "result");
    if (iRecords != null) {
      int counter = 0;
      String objectJson;
      for (ORecord<?> rec : iRecords) {
        if (rec != null)
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.beginCollection()

      final StringWriter buffer = new StringWriter();
      final OJSONWriter json = new OJSONWriter(buffer);

      json.beginObject();
      if (db.getMetadata().getSchema().getClasses() != null) {
        json.beginCollection(1, false, "classes");
        Set<String> exportedNames = new HashSet<String>();
        for (OClass cls : db.getMetadata().getSchema().getClasses()) {
          if (!exportedNames.contains(cls.getName()))
            try {
              exportClass(db, json, cls);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.